Reputation: 31
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await AwesomeNotifications().listScheduledNotifications();
await NotificationHelper.initializeNotificationListeners();
static Future<void> initializeNotificationListeners() async {
print('Initializing notification listeners');
await AwesomeNotifications().setListeners(
onActionReceivedMethod: onActionReceivedMethod,
onNotificationDisplayedMethod: onNotificationDisplayedMethod,
);
I’ve written it so that an alert window appears at the set alarm time using AwesomeNotifications().setListeners. When the app is in the foreground, the alert window shows up for each alarm, showing multiple alerts as expected. However, when the app is terminated (closed) and the alarm rings, and then the app returns to the foreground, only one alert window appears, even if multiple alarms are set. What could be the issue? Is it related to the stream?
Upvotes: 0
Views: 28