stopBackgroundService method

  1. @override
Future<bool> stopBackgroundService(
  1. ServiceType type, {
  2. String? callCid,
})
override

Implementation

@override
Future<bool> stopBackgroundService(
  ServiceType type, {
  String? callCid,
}) async {
  if (await isBackgroundServiceRunning(type, callCid: callCid) == true) {
    return await methodChannel.invokeMethod(
      'stopBackgroundService',
      {
        'type': type.name,
        if (callCid != null) 'callCid': callCid,
      },
    );
  }
  return false;
}