create static method

Future<PlayInAppUpdate> create({
  1. int? engineId,
})

Creates a wrapper by obtaining the Android application context.

Implementation

static Future<PlayInAppUpdate> create({int? engineId}) async {
  if (!Platform.isAndroid) {
    throw UnsupportedError('play_in_app_update only works on Android');
  }

  final context = jni.Jni.androidApplicationContext;

  final manager = AppUpdateManagerFactory.create(context);
  return PlayInAppUpdate._(manager, engineId ?? PlatformDispatcher.instance.engineId);
}