public class FlutterPluginRegistry extends Object implements PluginRegistry, PluginRegistry.RequestPermissionsResultListener, PluginRegistry.ActivityResultListener, PluginRegistry.NewIntentListener, PluginRegistry.UserLeaveHintListener, PluginRegistry.ViewDestroyListener
PluginRegistry.ActivityResultListener, PluginRegistry.NewIntentListener, PluginRegistry.PluginRegistrantCallback, PluginRegistry.Registrar, PluginRegistry.RequestPermissionsResultListener, PluginRegistry.UserLeaveHintListener, PluginRegistry.ViewDestroyListener| Constructor and Description |
|---|
FlutterPluginRegistry(FlutterNativeView nativeView,
Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(FlutterView flutterView,
Activity activity) |
void |
destroy() |
void |
detach() |
boolean |
hasPlugin(String key)
Returns whether the specified plugin is known to this registry.
|
boolean |
onActivityResult(int requestCode,
int resultCode,
Intent data) |
boolean |
onNewIntent(Intent intent) |
void |
onPreEngineRestart() |
boolean |
onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults) |
void |
onUserLeaveHint() |
boolean |
onViewDestroy(FlutterNativeView view) |
PluginRegistry.Registrar |
registrarFor(String pluginKey)
Returns a
PluginRegistry.Registrar for receiving the registrations pertaining
to the specified plugin. |
<T> T |
valuePublishedByPlugin(String pluginKey)
Returns the value published by the specified plugin, if any.
|
public FlutterPluginRegistry(FlutterNativeView nativeView, Context context)
public boolean hasPlugin(String key)
PluginRegistryhasPlugin in interface PluginRegistrykey - a unique String identifying the plugin; typically the
fully qualified name of the plugin's main class.public <T> T valuePublishedByPlugin(String pluginKey)
PluginRegistryPlugins may publish a single value, such as an instance of the plugin's main class, for situations where external control or interaction is needed. Clients are expected to know the value's type.
valuePublishedByPlugin in interface PluginRegistrypluginKey - a unique String identifying the plugin; typically the
fully qualified name of the plugin's main class.public PluginRegistry.Registrar registrarFor(String pluginKey)
PluginRegistryPluginRegistry.Registrar for receiving the registrations pertaining
to the specified plugin.registrarFor in interface PluginRegistrypluginKey - a unique String identifying the plugin; typically the
fully qualified name of the plugin's main class.public void attach(FlutterView flutterView, Activity activity)
public void detach()
public void onPreEngineRestart()
public boolean onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults)
onRequestPermissionsResult in interface PluginRegistry.RequestPermissionsResultListenerpublic boolean onActivityResult(int requestCode,
int resultCode,
Intent data)
onActivityResult in interface PluginRegistry.ActivityResultListenerpublic boolean onNewIntent(Intent intent)
onNewIntent in interface PluginRegistry.NewIntentListenerpublic void onUserLeaveHint()
onUserLeaveHint in interface PluginRegistry.UserLeaveHintListenerpublic boolean onViewDestroy(FlutterNativeView view)
onViewDestroy in interface PluginRegistry.ViewDestroyListenerpublic void destroy()