Package io.flutter.view
Class FlutterMain
- java.lang.Object
-
- io.flutter.view.FlutterMain
-
@Deprecated public class FlutterMain extends Object
Deprecated.Replaced byFlutterLoader.A legacy class to initialize the Flutter engine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlutterMain.SettingsDeprecated.
-
Constructor Summary
Constructors Constructor Description FlutterMain()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidensureInitializationComplete(Context applicationContext, String[] args)Deprecated.Blocks until initialization of the native system has completed.static voidensureInitializationCompleteAsync(Context applicationContext, String[] args, Handler callbackHandler, Runnable callback)Deprecated.Same asensureInitializationComplete(Context, String[])but waiting on a background thread, then invokingcallbackon thecallbackHandler.static StringfindAppBundlePath()Deprecated.static StringfindAppBundlePath(Context applicationContext)Deprecated.static StringgetLookupKeyForAsset(String asset)Deprecated.Returns the file name for the given asset.static StringgetLookupKeyForAsset(String asset, String packageName)Deprecated.Returns the file name for the given asset which originates from the specified packageName.static voidstartInitialization(Context applicationContext)Deprecated.Starts initialization of the native system.static voidstartInitialization(Context applicationContext, FlutterMain.Settings settings)Deprecated.Starts initialization of the native system.
-
-
-
Method Detail
-
startInitialization
public static void startInitialization(@NonNull Context applicationContext)Deprecated.Starts initialization of the native system.- Parameters:
applicationContext- The Android application context.
-
startInitialization
public static void startInitialization(@NonNull Context applicationContext, @NonNull FlutterMain.Settings settings)Deprecated.Starts initialization of the native system.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.
- Parameters:
applicationContext- The Android application context.settings- Configuration settings.
-
ensureInitializationComplete
public static void ensureInitializationComplete(@NonNull Context applicationContext, @Nullable String[] args)Deprecated.Blocks until initialization of the native system has completed.Calling this method multiple times has no effect.
- Parameters:
applicationContext- The Android application context.args- Flags sent to the Flutter runtime.
-
ensureInitializationCompleteAsync
public static void ensureInitializationCompleteAsync(@NonNull Context applicationContext, @Nullable String[] args, @NonNull Handler callbackHandler, @NonNull Runnable callback)Deprecated.Same asensureInitializationComplete(Context, String[])but waiting on a background thread, then invokingcallbackon thecallbackHandler.
-
findAppBundlePath
@NonNull public static String findAppBundlePath()
Deprecated.
-
findAppBundlePath
@Deprecated @Nullable public static String findAppBundlePath(@NonNull Context applicationContext)
Deprecated.
-
getLookupKeyForAsset
@NonNull public static String getLookupKeyForAsset(@NonNull String asset)
Deprecated.Returns the file name for the given asset. The returned file name can be used to access the asset in the APK through theAssetManagerAPI.- Parameters:
asset- the name of the asset. The name can be hierarchical- Returns:
- the filename to be used with
AssetManager
-
getLookupKeyForAsset
@NonNull public static String getLookupKeyForAsset(@NonNull String asset, @NonNull String packageName)
Deprecated.Returns the file name for the given asset which originates from the specified packageName. The returned file name can be used to access the asset in the APK through theAssetManagerAPI.- Parameters:
asset- the name of the asset. The name can be hierarchicalpackageName- the name of the package from which the asset originates- Returns:
- the file name to be used with
AssetManager
-
-