initService method

Future<void> initService(
  1. CobiFlutterServiceCallback callback,
  2. bool autostartOnBoot
)
override

Implementation

Future<void> initService(CobiFlutterServiceCallback callback, bool autostartOnBoot) async {
  await init(isolateFunctionMethodChannelCommon, callback, autostartOnBoot);
  bool? isRunning = await _methodChannel.invokeMethod("isServiceRunning");
  _streamControllerServiceRunning.sink.add(isRunning);
}