registerWithApiKey method

Future<OmiRegisterResult> registerWithApiKey({
  1. required String fullName,
  2. required String userUuid,
  3. required String apiKey,
  4. required String phone,
  5. required String fcmToken,
  6. bool isVideo = true,
  7. String projectId = "",
})

Register a customer (App-to-App) with an OMICall API key.

fcmToken is the FCM token on Android and the APNS token on iOS.

Implementation

Future<OmiRegisterResult> registerWithApiKey({
  required String fullName,
  required String userUuid,
  required String apiKey,
  required String phone,
  required String fcmToken,
  bool isVideo = true,
  String projectId = "",
}) async {
  final action = OmiAction(
    actionName: OmiActionName.INIT_CALL_API_KEY,
    data: {
      'fullName': fullName,
      'usrUuid': userUuid,
      'apiKey': apiKey,
      'phone': phone,
      'isVideo': isVideo,
      'fcmToken': fcmToken,
      'projectId': projectId,
    },
  );
  return OmiRegisterResult.fromNative(await _controller.action(action));
}