FlutterLoader
.@Deprecated public class FlutterMain extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FlutterMain.Settings
Deprecated.
|
Constructor and Description |
---|
FlutterMain()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static void |
ensureInitializationComplete(Context applicationContext,
String[] args)
Deprecated.
Blocks until initialization of the native system has completed.
|
static void |
ensureInitializationCompleteAsync(Context applicationContext,
String[] args,
Handler callbackHandler,
Runnable callback)
Deprecated.
Same as
ensureInitializationComplete(Context, String[]) but waiting on a background
thread, then invoking callback on the callbackHandler . |
static String |
findAppBundlePath()
Deprecated.
|
static String |
findAppBundlePath(Context applicationContext)
Deprecated.
|
static String |
getLookupKeyForAsset(String asset)
Deprecated.
Returns the file name for the given asset.
|
static String |
getLookupKeyForAsset(String asset,
String packageName)
Deprecated.
Returns the file name for the given asset which originates from the specified packageName.
|
static void |
startInitialization(Context applicationContext)
Deprecated.
Starts initialization of the native system.
|
static void |
startInitialization(Context applicationContext,
FlutterMain.Settings settings)
Deprecated.
Starts initialization of the native system.
|
public static void startInitialization(@NonNull Context applicationContext)
applicationContext
- The Android application context.public static void startInitialization(@NonNull Context applicationContext, @NonNull FlutterMain.Settings settings)
This loads the Flutter engine's native library to enable subsequent JNI calls. This also starts locating and unpacking Dart resources packaged in the app's APK.
Calling this method multiple times has no effect.
applicationContext
- The Android application context.settings
- Configuration settings.public static void ensureInitializationComplete(@NonNull Context applicationContext, @Nullable String[] args)
Calling this method multiple times has no effect.
applicationContext
- The Android application context.args
- Flags sent to the Flutter runtime.public static void ensureInitializationCompleteAsync(@NonNull Context applicationContext, @Nullable String[] args, @NonNull Handler callbackHandler, @NonNull Runnable callback)
ensureInitializationComplete(Context, String[])
but waiting on a background
thread, then invoking callback
on the callbackHandler
.@NonNull public static String findAppBundlePath()
@Deprecated @Nullable public static String findAppBundlePath(@NonNull Context applicationContext)
@NonNull public static String getLookupKeyForAsset(@NonNull String asset)
AssetManager
API.asset
- the name of the asset. The name can be hierarchicalAssetManager
@NonNull public static String getLookupKeyForAsset(@NonNull String asset, @NonNull String packageName)
AssetManager
API.asset
- the name of the asset. The name can be hierarchicalpackageName
- the name of the package from which the asset originatesAssetManager