public interface ContentProviderControlSurface
ContentProvider attaches to a FlutterEngine.
A ContentProvider that contains a FlutterEngine should coordinate itself with
the FlutterEngine's ContentProviderControlSurface.
| Modifier and Type | Method and Description |
|---|---|
void |
attachToContentProvider(ContentProvider contentProvider,
androidx.lifecycle.Lifecycle lifecycle)
Call this method from the
ContentProvider that is running the FlutterEngine
that is associated with this ContentProviderControlSurface. |
void |
detachFromContentProvider()
Call this method from the
ContentProvider that is attached to this ContentProviderControlSurfaces's FlutterEngine when the ContentProvider is
about to be destroyed. |
void attachToContentProvider(@NonNull
ContentProvider contentProvider,
@NonNull
androidx.lifecycle.Lifecycle lifecycle)
ContentProvider that is running the FlutterEngine
that is associated with this ContentProviderControlSurface.
Once a ContentProvider is created, and its associated FlutterEngine is
executing Dart code, the ContentProvider should invoke this method. At that point the
FlutterEngine is considered "attached" to the ContentProvider and all ContentProviderAware plugins are given access to the ContentProvider.
void detachFromContentProvider()
ContentProvider that is attached to this ContentProviderControlSurfaces's 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.