setNewStatus function

Future<void> setNewStatus(
  1. MethodChannel channel,
  2. ServiceStatus newStatus
)

Implementation

@pragma('vm:entry-point')
Future<void> setNewStatus(
    MethodChannel channel, ServiceStatus newStatus) async {
  currentStatus = newStatus;
  await channel.invokeMethod<dynamic>(
      "data", {"type": "status", "status": newStatus.index});
}