Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
impl: long text style notif
Browse files Browse the repository at this point in the history
  • Loading branch information
reasje committed Jan 12, 2024
1 parent affbd3b commit 54cf663
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions lib/core/src/notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,27 @@ class AXSNotification {
notification.title,
notification.body,
NotificationDetails(
android: AndroidNotificationDetails(channel.id, channel.name,
groupKey: 'axs_wallet',
channelDescription: channel.description,
importance: Importance.high,
priority: Priority.high,
playSound: true,
visibility: NotificationVisibility.public,
icon: 'axs_logo',
color: ColorsTheme.primary300,
largeIcon: largeImage),
android: AndroidNotificationDetails(
channel.id,
channel.name,
groupKey: 'axs_wallet',
channelDescription: channel.description,
importance: Importance.high,
priority: Priority.high,
playSound: true,
visibility: NotificationVisibility.public,
icon: 'axs_logo',
color: ColorsTheme.primary300,
largeIcon: largeImage,
),
),
);
}
}

void showNotification(String title, String text) {
if (!kIsWeb) {
var bigTextStyleInformation = BigTextStyleInformation(text);
flutterLocalNotificationsPlugin.show(
title.hashCode,
title,
Expand All @@ -105,7 +109,8 @@ class AXSNotification {
visibility: NotificationVisibility.public,
icon: 'axs_logo',
color: ColorsTheme.primary300,
largeIcon: null),
largeIcon: null,
styleInformation: bigTextStyleInformation),
iOS: DarwinNotificationDetails(
subtitle: text,
)),
Expand Down

0 comments on commit 54cf663

Please sign in to comment.