Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface Interface Reference

Public Member Functions

void attachToContentProvider ( @NonNull ContentProvider contentProvider, @NonNull Lifecycle lifecycle)
 
void detachFromContentProvider ()
 

Detailed Description

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.

Member Function Documentation

◆ attachToContentProvider()

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.

◆ detachFromContentProvider()

void io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface.detachFromContentProvider ( )

Call this method from the ContentProvider that is attached to this
ContentProviderControlSurfaces
's io.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.


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