createNotification method
Create an immediate notification with id
, title
, and body
.
If the id
is not specified, a random id will be generated.
Returns the id of the notification created.
Implementation
@override
Future<int> createNotification({
int? id,
required String title,
String? body,
}) async {
id ??= _random.nextInt(1000);
await FlutterLocalNotificationsPlugin().show(
id,
title,
body,
_platformChannelSpecifics,
);
return id;
}