updateService method

  1. @override
Future<bool> updateService({
  1. String? notificationTitle,
  2. String? notificationText,
  3. Function? callback,
})
override

Implementation

@override
Future<bool> updateService({
  String? notificationTitle,
  String? notificationText,
  Function? callback,
}) async {
  if (await isRunningService) {
    final options = <String, dynamic>{
      'notificationContentTitle': notificationTitle,
      'notificationContentText': notificationText,
    };
    if (callback != null) {
      options['callbackHandle'] =
          PluginUtilities.getCallbackHandle(callback)?.toRawHandle();
    }
    return await methodChannel.invokeMethod('updateService', options);
  }
  return false;
}