showNotification method
dynamic
showNotification(
- AtNotification atNotification
Implementation
showNotification(at_client.AtNotification atNotification) async {
const AndroidNotificationDetails androidPlatformChannelSpecifics =
AndroidNotificationDetails(
'CHANNEL_ID',
'CHANNEL_NAME',
//'CHANNEL_DESCRIPTION',
importance: Importance.max,
priority: Priority.high,
showWhen: false,
styleInformation: BigTextStyleInformation(''),
);
var iosChannelSpecifics = DarwinNotificationDetails();
var platformChannelSpecifics = NotificationDetails(
android: androidPlatformChannelSpecifics, iOS: iosChannelSpecifics);
await _notificationsPlugin.show(
0,
'${atNotification.from} is following your ${atNotification.to} @sign',
'Open the app to follow them back',
platformChannelSpecifics,
payload: jsonEncode(atNotification.toJson()));
}