initiateAssistanceCall method

  1. @override
Future<MoveAssistanceCallStatus> initiateAssistanceCall()
override

Inititate an Assistance Call to emergency services. Returns a status wether the call succeeded.

Implementation

@override
Future<MoveAssistanceCallStatus> initiateAssistanceCall() async {
  try {
    await methodChannel.invokeMethod('initiateAssistanceCall');
  } on PlatformException catch (e) {
    switch (e.code) {
      case "networkError":
        return MoveAssistanceCallStatus.networkError;
      case "initializationError":
        return MoveAssistanceCallStatus.initializationError;
    }
  }

  return MoveAssistanceCallStatus.success;
}