Flutter Engine
The Flutter Engine
|
Public Member Functions | |
void | attachToContentProvider ( @NonNull ContentProvider contentProvider, @NonNull Lifecycle lifecycle) |
void | detachFromContentProvider () |
Control surface through which a ContentProvider
attaches to a io.flutter.embedding.engine.FlutterEngine
.
A ContentProvider
that contains a io.flutter.embedding.engine.FlutterEngine
should coordinate itself with the io.flutter.embedding.engine.FlutterEngine
's
.
ContentProviderControlSurface
Definition at line 19 of file ContentProviderControlSurface.java.
void io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface.attachToContentProvider | ( | @NonNull ContentProvider | contentProvider, |
@NonNull Lifecycle | lifecycle | ||
) |
Call this method from the ContentProvider
that is running the io.flutter.embedding.engine.FlutterEngine
that is associated with this
.
ContentProviderControlSurface
Once a ContentProvider
is created, and its associated io.flutter.embedding.engine.FlutterEngine
is executing Dart code, the ContentProvider
should invoke this method. At that point the io.flutter.embedding.engine.FlutterEngine
is considered "attached" to the ContentProvider
and all ContentProviderAware
plugins are given access to the ContentProvider
.
void io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface.detachFromContentProvider | ( | ) |
Call this method from the ContentProvider
that is attached to this
's
ContentProviderControlSurfacesio.flutter.embedding.engine.FlutterEngine
when the ContentProvider
is about to be destroyed.
This method gives each ContentProviderAware
plugin an opportunity to clean up its references before the is destroyed
.