Interface ContentProviderControlSurface
-
public interface ContentProviderControlSurface
Control surface through which aContentProvider
attaches to aFlutterEngine
.A
ContentProvider
that contains aFlutterEngine
should coordinate itself with theFlutterEngine
'sContentProviderControlSurface
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
attachToContentProvider(ContentProvider contentProvider, androidx.lifecycle.Lifecycle lifecycle)
Call this method from theContentProvider
that is running theFlutterEngine
that is associated with thisContentProviderControlSurface
.void
detachFromContentProvider()
Call this method from theContentProvider
that is attached to thisContentProviderControlSurfaces
'sFlutterEngine
when theContentProvider
is about to be destroyed.
-
-
-
Method Detail
-
attachToContentProvider
void attachToContentProvider(@NonNull ContentProvider contentProvider, @NonNull androidx.lifecycle.Lifecycle lifecycle)
Call this method from theContentProvider
that is running theFlutterEngine
that is associated with thisContentProviderControlSurface
.Once a
ContentProvider
is created, and its associatedFlutterEngine
is executing Dart code, theContentProvider
should invoke this method. At that point theFlutterEngine
is considered "attached" to theContentProvider
and allContentProviderAware
plugins are given access to theContentProvider
.
-
detachFromContentProvider
void detachFromContentProvider()
Call this method from theContentProvider
that is attached to thisContentProviderControlSurfaces
'sFlutterEngine
when theContentProvider
is about to be destroyed.This method gives each
ContentProviderAware
plugin an opportunity to clean up its references before theis destroyed
.
-
-