Package io.flutter.plugin.common
Interface PluginRegistry
-
- All Known Implementing Classes:
FlutterActivity,FlutterActivityDelegate,FlutterFragmentActivity,FlutterPluginRegistry,ShimPluginRegistry
public interface PluginRegistryContainer class for Android API listeners used byActivityPluginBinding.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
PluginRegistryto 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 mainActivity, which defaults to an instance ofFlutterActivity, itself aPluginRegistry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfacePluginRegistry.ActivityResultListenerDelegate interface for handling activity results on behalf of the mainActivity.static interfacePluginRegistry.NewIntentListenerDelegate interface for handling new intents on behalf of the mainActivity.static interfacePluginRegistry.PluginRegistrantCallbackDeprecated.See https://flutter.dev/go/android-project-migration for migration details.static interfacePluginRegistry.RegistrarDeprecated.This registrar is for Flutter's v1 embedding.static interfacePluginRegistry.RequestPermissionsResultListenerDelegate interface for handling result of permissions requests on behalf of the mainActivity.static interfacePluginRegistry.UserLeaveHintListenerDelegate interface for handling user leave hints on behalf of the mainActivity.static interfacePluginRegistry.ViewDestroyListenerDeprecated.See https://flutter.dev/go/android-project-migration for migration details.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanhasPlugin(String pluginKey)Deprecated.See https://flutter.dev/go/android-project-migration for migration details.PluginRegistry.RegistrarregistrarFor(String pluginKey)Deprecated.See https://flutter.dev/go/android-project-migration for migration details.<T> TvaluePublishedByPlugin(String pluginKey)Deprecated.See https://flutter.dev/go/android-project-migration for migration details.
-
-
-
Method Detail
-
registrarFor
@Deprecated @NonNull PluginRegistry.Registrar registrarFor(@NonNull String pluginKey)
Deprecated.See https://flutter.dev/go/android-project-migration for migration details.Returns aPluginRegistry.Registrarfor receiving the registrations pertaining to the specified plugin.- Parameters:
pluginKey- a unique String identifying the plugin; typically the fully qualified name of the plugin's main class.- Returns:
- A
PluginRegistry.Registrarfor receiving the registrations pertianing to the specified plugin.
-
hasPlugin
@Deprecated boolean hasPlugin(@NonNull String pluginKey)
Deprecated.See https://flutter.dev/go/android-project-migration for migration details.Returns whether the specified plugin is known to this registry.- Parameters:
pluginKey- a 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.
-
valuePublishedByPlugin
@Deprecated @Nullable <T> T valuePublishedByPlugin(@NonNull String pluginKey)
Deprecated.See https://flutter.dev/go/android-project-migration for migration details.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.
- Type Parameters:
T- The type of the value.- Parameters:
pluginKey- a unique String identifying the plugin; typically the fully qualified name of the plugin's main class.- Returns:
- the published value, possibly null.
-
-