startEnabledNotifications method

  1. @override
Future<void> startEnabledNotifications(
  1. void callback(
    1. 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');
}