startEnabledNotifications method
Future<void>
startEnabledNotifications(
- void callback(
- bool result
)
)
override
Implementation
@override
Future<void> startEnabledNotifications(
void Function(bool result) callback) async {
_enabledNotificationStream = _startEnabledNotificationsEventChannel
.receiveBroadcastStream()
.listen((event) {
if (event == null || event["value"] == null) {
throw PlatformException(
code: "startEnabledNotifications(): error retrieving value");
}
callback(event['value']);
});
return await _methodChannel.invokeMethod<void>('startEnabledNotifications');
}