Package io.flutter.embedding.android
Interface FlutterEngineConfigurator
- All Known Implementing Classes:
FlutterActivity,FlutterFragment,FlutterFragmentActivity
public interface FlutterEngineConfigurator
Configures a
FlutterEngine after it is created, e.g., adds
plugins.
This interface may be applied to a FragmentActivity that owns a
FlutterFragment.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUpFlutterEngine(FlutterEngine flutterEngine) Cleans up references that were established inconfigureFlutterEngine(FlutterEngine)before the host is destroyed or detached.voidconfigureFlutterEngine(FlutterEngine flutterEngine) Configures the givenFlutterEngine.
-
Method Details
-
configureFlutterEngine
Configures the givenFlutterEngine.This method is called after the given
FlutterEnginehas been attached to the owningFragmentActivity. SeeActivityControlSurface.attachToActivity(ExclusiveAppComponent, Lifecycle).It is possible that the owning
FragmentActivityopted not to connect itself as anActivityControlSurface. In that case, any configuration, e.g., plugins, must not expect or depend upon an availableActivityat the time that this method is invoked.- Parameters:
flutterEngine- The Flutter engine.
-
cleanUpFlutterEngine
Cleans up references that were established inconfigureFlutterEngine(FlutterEngine)before the host is destroyed or detached.- Parameters:
flutterEngine- The Flutter engine.
-