diff --git a/ios/Classes/SwiftAlarmPlugin.swift b/ios/Classes/SwiftAlarmPlugin.swift index d19ca3f4..136abc68 100644 --- a/ios/Classes/SwiftAlarmPlugin.swift +++ b/ios/Classes/SwiftAlarmPlugin.swift @@ -146,8 +146,8 @@ public class SwiftAlarmPlugin: NSObject, FlutterPlugin { DispatchQueue.main.async { self.alarms[id]?.timer = Timer.scheduledTimer(timeInterval: delayInSeconds, target: self, selector: #selector(self.executeTask(_:)), userInfo: id, repeats: false) - SwiftAlarmPlugin.scheduleAppRefresh() } + SwiftAlarmPlugin.scheduleAppRefresh() } result(true) } else { diff --git a/lib/alarm.dart b/lib/alarm.dart index c307d26f..80ea4ae6 100644 --- a/lib/alarm.dart +++ b/lib/alarm.dart @@ -22,7 +22,7 @@ class Alarm { static bool get android => defaultTargetPlatform == TargetPlatform.android; /// Stream of the ringing status. - static final ringStream = StreamController(); + static final ringStream = StreamController.broadcast(); /// Initializes Alarm services. ///