Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
io.flutter.plugin.common.PluginRegistry Interface Reference
Inheritance diagram for io.flutter.plugin.common.PluginRegistry:
io.flutter.app.FlutterActivity io.flutter.app.FlutterActivityDelegate io.flutter.app.FlutterFragmentActivity io.flutter.app.FlutterPluginRegistry

Classes

interface  ActivityResultListener
 
interface  NewIntentListener
 
interface  PluginRegistrantCallback
 
interface  Registrar
 
interface  RequestPermissionsResultListener
 
interface  UserLeaveHintListener
 
interface  ViewDestroyListener
 
interface  WindowFocusChangedListener
 

Public Member Functions

Registrar registrarFor (@NonNull String pluginKey)
 
boolean hasPlugin (@NonNull String pluginKey)
 
< T > T valuePublishedByPlugin (@NonNull String pluginKey)
 

Detailed Description

Container class for Android API listeners used by ActivityPluginBinding.

This class also contains deprecated v1 embedding APIs used for plugin registration.

In v1 Android applications, an auto-generated and auto-updated plugin registrant class (GeneratedPluginRegistrant) makes use of a PluginRegistry to register contributions from each plugin mentioned in the application's pubspec file. The generated registrant class is, again by default, called from the application's main android.app.Activity, which defaults to an instance of io.flutter.app.FlutterActivity, itself a PluginRegistry.

Definition at line 31 of file PluginRegistry.java.

Member Function Documentation

◆ hasPlugin()

boolean io.flutter.plugin.common.PluginRegistry.hasPlugin ( @NonNull String  pluginKey)

Returns whether the specified plugin is known to this registry.

Parameters
pluginKeya unique String identifying the plugin; typically the fully qualified name of the plugin's main class.
Returns
true if this registry has handed out a registrar for the specified plugin.
Deprecated:
See https://flutter.dev/go/android-project-migration for migration details.

◆ registrarFor()

Registrar io.flutter.plugin.common.PluginRegistry.registrarFor ( @NonNull String  pluginKey)

Returns a Registrar for receiving the registrations pertaining to the specified plugin.

Parameters
pluginKeya unique String identifying the plugin; typically the fully qualified name of the plugin's main class.
Returns
A Registrar for receiving the registrations pertianing to the specified plugin.
Deprecated:
See https://flutter.dev/go/android-project-migration for migration details.

◆ valuePublishedByPlugin()

< T > T io.flutter.plugin.common.PluginRegistry.valuePublishedByPlugin ( @NonNull String  pluginKey)

Returns the value published by the specified plugin, if any.

Plugins 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.

Parameters
<T>The type of the value.
pluginKeya unique String identifying the plugin; typically the fully qualified name of the plugin's main class.
Returns
the published value, possibly null.
Deprecated:
See https://flutter.dev/go/android-project-migration for migration details.

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