|
|
@ -191,8 +191,7 @@ class _TabNavigatorState extends State<TabNavigator>
|
|
|
|
4,
|
|
|
|
4,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
];
|
|
|
|
];
|
|
|
|
return UpdaterPage(
|
|
|
|
return BeeScaffold(
|
|
|
|
BeeScaffold(
|
|
|
|
|
|
|
|
body: WillPopScope(
|
|
|
|
body: WillPopScope(
|
|
|
|
onWillPop: () async {
|
|
|
|
onWillPop: () async {
|
|
|
|
if (_lastPressed == null ||
|
|
|
|
if (_lastPressed == null ||
|
|
|
@ -227,7 +226,6 @@ class _TabNavigatorState extends State<TabNavigator>
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -238,18 +236,23 @@ class _TabNavigatorState extends State<TabNavigator>
|
|
|
|
//payload 可作为通知的一个标记,区分点击的通知。
|
|
|
|
//payload 可作为通知的一个标记,区分点击的通知。
|
|
|
|
debugPrint('payload:$payload');
|
|
|
|
debugPrint('payload:$payload');
|
|
|
|
if (payload == "complete") {
|
|
|
|
if (payload == "complete") {
|
|
|
|
await showDialog(context: context, builder: (_) => AlertDialog(
|
|
|
|
await showDialog(
|
|
|
|
|
|
|
|
context: context,
|
|
|
|
|
|
|
|
builder: (_) => AlertDialog(
|
|
|
|
title: Text('Notification'),
|
|
|
|
title: Text('Notification'),
|
|
|
|
content: Text('$payload'),
|
|
|
|
content: Text('$payload'),
|
|
|
|
),);
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
showNotification() async {
|
|
|
|
showNotification() async {
|
|
|
|
var android = new AndroidNotificationDetails(
|
|
|
|
var android = new AndroidNotificationDetails(
|
|
|
|
'channel id', 'channel NAME',
|
|
|
|
'channel id',
|
|
|
|
|
|
|
|
'channel NAME',
|
|
|
|
priority: Priority.high,
|
|
|
|
priority: Priority.high,
|
|
|
|
importance: Importance.max,);
|
|
|
|
importance: Importance.max,
|
|
|
|
|
|
|
|
);
|
|
|
|
var iOS = new IOSNotificationDetails();
|
|
|
|
var iOS = new IOSNotificationDetails();
|
|
|
|
var platform = new NotificationDetails(android: android, iOS: iOS);
|
|
|
|
var platform = new NotificationDetails(android: android, iOS: iOS);
|
|
|
|
await flutterLocalNotificationsPlugin.show(
|
|
|
|
await flutterLocalNotificationsPlugin.show(
|
|
|
|