Skip to content

Commit 4d8aa14

Browse files
authored
Fix outdated examples in README.md (#2083)
1 parent 02e3441 commit 4d8aa14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

flutter_local_notifications/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ flutterLocalNotificationsPlugin.initialize(initializationSettings,
353353
...
354354
355355
void onDidReceiveLocalNotification(
356-
int id, String title, String body, String payload) async {
356+
int id, String title?, String? body, String? payload) async {
357357
// display a dialog with the notification details, tap ok to go to another page
358358
showDialog(
359359
context: context,
@@ -455,15 +455,15 @@ final DarwinInitializationSettings initializationSettingsDarwin = DarwinInitiali
455455
const DarwinNotificationCategory(
456456
'demoCategory',
457457
<DarwinNotificationAction>[
458-
DarwinNotificationAction('id_1', 'Action 1'),
459-
DarwinNotificationAction(
458+
DarwinNotificationAction.plain('id_1', 'Action 1'),
459+
DarwinNotificationAction.plain(
460460
'id_2',
461461
'Action 2',
462462
options: <DarwinNotificationActionOption>{
463463
DarwinNotificationActionOption.destructive,
464464
},
465465
),
466-
DarwinNotificationAction(
466+
DarwinNotificationAction.plain(
467467
'id_3',
468468
'Action 3',
469469
options: <DarwinNotificationActionOption>{

0 commit comments

Comments
 (0)