Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
io.flutter.app.FlutterPlayStoreSplitApplication Class Reference
Inheritance diagram for io.flutter.app.FlutterPlayStoreSplitApplication:

Public Member Functions

void onCreate ()
 

Detailed Description

Flutter's extension of SplitCompatApplication that injects a PlayStoreDeferredComponentManager with FlutterInjector to enable Split AOT Flutter apps.

To use this class, either have your custom application class extend FlutterPlayStoreSplitApplication or use it directly in the app's AndroidManifest.xml by adding the following line:


<manifest
...
<application
android:name="io.flutter.app.FlutterPlayStoreSplitApplication"
...>
</application>
</manifest>

This class is meant to be used with the Google Play store. Custom non-play store applications do not need to extend SplitCompatApplication and should inject a custom io.flutter.embedding.engine.deferredcomponents.DeferredComponentManager implementation like so:


FlutterInjector.setInstance(
new FlutterInjector.Builder().setDeferredComponentManager(yourCustomManager).build());

Definition at line 39 of file FlutterPlayStoreSplitApplication.java.

Member Function Documentation

◆ onCreate()

void io.flutter.app.FlutterPlayStoreSplitApplication.onCreate ( )
inline

Definition at line 42 of file FlutterPlayStoreSplitApplication.java.

42 {
43 super.onCreate();
44 // Create and inject a PlayStoreDeferredComponentManager, which is the default manager for
45 // interacting with the Google Play Store.
46 PlayStoreDeferredComponentManager deferredComponentManager =
47 new PlayStoreDeferredComponentManager(this, null);
48 FlutterInjector.setInstance(
49 new FlutterInjector.Builder()
50 .setDeferredComponentManager(deferredComponentManager)
51 .build());
52 }

The documentation for this class was generated from the following file: