startCall method

Future startCall(
  1. String phoneNumber,
  2. bool isVideo
)

Implementation

Future<dynamic> startCall(
  String phoneNumber,
  bool isVideo,
) async {
  //check permission
  // final microphoneRequest = await Permission.microphone.request();
  // if (microphoneRequest.isGranted) {
  //   final action = OmiAction(actionName: OmiActionName.START_CALL, data: {
  //     'phoneNumber': phoneNumber,
  //     'isVideo': isVideo,
  //   });
  //   return await _controller.action(action);
  // }
  // // return OmiStartCallStatus.permissionDenied.rawValue;
  // return {"status":1, "callInfo": Null, "message": "FAIL"};
  final action = OmiAction(actionName: OmiActionName.START_CALL, data: {
      'phoneNumber': phoneNumber,
      'isVideo': isVideo,
    });
    return await _controller.action(action);
}