invoke<T> static method

Future<T?> invoke<T>(
  1. String method, [
  2. Map<String, Object?>? arguments
])

Implementation

static Future<T?> invoke<T>(String method, [Map<String, Object?>? arguments]) async {
  try {
    return await _channel.invokeMethod<T>(method, arguments);
  } on PlatformException catch (error) {
    throw UArException.fromPlatform(error);
  } on MissingPluginException {
    throw const UArException(code: UArErrorCode.unsupported, message: "AR is not available on this platform");
  } on UArException {
    rethrow;
  } catch (error) {
    throw UArException(code: UArErrorCode.unknown, message: "$error");
  }
}