startRegistration method

  1. @override
Future<bool> startRegistration()
override

Implementation

@override
Future<bool> startRegistration() async {
  try {
    final ok = await methodChannel.invokeMethod<bool>('startRegistration');
    return ok ?? false;
  } on PlatformException catch (e) {
    if (e.code == 'REGISTRATION_ERROR') {
      // Re-throw with more context if needed, or handle specific error codes
      throw PlatformException(
        code: e.code,
        message: e.message,
        details: e.details,
      );
    }
    rethrow;
  }
}