我是 flutter_bloc 包的新手。如何使用 flutter_bloc 包显示通知警报。这是我在不使用 bloc 的情况下所做的示例。
IconButton(
icon: Icon(Icons.notifications),
onPressed: () {
String time=7:30
List<String> arr = time.split(':');
int aa = int.parse(arr[0]);
int bb = int.parse(arr[1]);
var time = new Time(aa, bb, 0);
var android = new AndroidNotificationDetails(
'Channel Id', 'Channel Name', 'Channel Des',);
var iOS = new IOSNotificationDetails();
var platform = new NotificationDetails(android, iOS);
flutterLocalNotificationsPlugin.showDailyAtTime(0, 'show daily title',
'Daily notification shown at approximately', time, platform);
},
)