Flutter Engine
The Flutter Engine
Instance Methods | List of all members
<FlutterPluginRegistry> Protocol Reference

#import <FlutterPlugin.h>

Inheritance diagram for <FlutterPluginRegistry>:
FlutterEngine FlutterViewController FlutterViewController FlutterEnginePartialMock FlutterEngineSpy FlutterHeadlessDartRunner MockableFlutterEngine AccessibilityBridgeTestViewController MouseEventFlutterViewController NoStatusBarFlutterViewController ShareViewController TextInputTestViewController AccessibilityBridgeTestViewController MouseEventFlutterViewController NoStatusBarFlutterViewController ShareViewController TextInputTestViewController

Instance Methods

(nullable NSObject< FlutterPluginRegistrar > *) - registrarForPlugin:
 
(BOOL- hasPlugin:
 
(nullable NSObject *) - valuePublishedByPlugin:
 
(nonnull id< FlutterPluginRegistrar >) - registrarForPlugin:
 
(nullable NSObject *) - valuePublishedByPlugin:
 

Detailed Description

A registry of Flutter iOS plugins.

Plugins are identified by unique string keys, typically the name of the plugin's main class. The registry tracks plugins by this key, mapping it to a value published by the plugin during registration, if any. This provides a very basic means of cross-plugin coordination with loose coupling between unrelated plugins.

Plugins typically need contextual information and the ability to register callbacks for various application events. To keep the API of the registry focused, these facilities are not provided directly by the registry, but by a FlutterPluginRegistrar, created by the registry in exchange for the unique key of the plugin.

There is no implied connection between the registry and the registrar. Specifically, callbacks registered by the plugin via the registrar may be relayed directly to the underlying iOS application objects.

A registry of Flutter macOS plugins.

Plugins are identified by unique string keys, typically the name of the plugin's main class.

Plugins typically need contextual information and the ability to register callbacks for various application events. To keep the API of the registry focused, these facilities are not provided directly by the registry, but by a FlutterPluginRegistrar, created by the registry in exchange for the unique key of the plugin.

There is no implied connection between the registry and the registrar. Specifically, callbacks registered by the plugin via the registrar may be relayed directly to the underlying iOS application objects.

Definition at line 402 of file FlutterPlugin.h.

Method Documentation

◆ hasPlugin:

- (BOOL) hasPlugin: (NSString *)  pluginKey

Returns whether the specified plugin has been registered.

Parameters
pluginKeyThe unique key identifying the plugin.
Returns
YES if registrarForPlugin has been called with pluginKey.

Reimplemented in FlutterEngine, and FlutterViewController.

◆ registrarForPlugin: [1/2]

- (nonnull id< FlutterPluginRegistrar >) registrarForPlugin: (nonnull NSString *)  pluginKey

Returns a registrar for registering a plugin.

Parameters
pluginKeyThe unique key identifying the plugin.

◆ registrarForPlugin: [2/2]

- (nullable NSObject< FlutterPluginRegistrar > *) registrarForPlugin: (NSString *)  pluginKey

Returns a registrar for registering a plugin.

Parameters
pluginKeyThe unique key identifying the plugin.

Reimplemented in FlutterEngine, and FlutterViewController.

◆ valuePublishedByPlugin: [1/2]

- (nullable NSObject *) valuePublishedByPlugin: (nonnull NSString *)  pluginKey

Returns a value published by the specified plugin.

Parameters
pluginKeyThe unique key identifying the plugin.
Returns
An object published by the plugin, if any. Will be NSNull if nothing has been published. Will be nil if the plugin has not been registered.

◆ valuePublishedByPlugin: [2/2]

- (nullable NSObject *) valuePublishedByPlugin: (NSString *)  pluginKey

Returns a value published by the specified plugin.

Parameters
pluginKeyThe unique key identifying the plugin.
Returns
An object published by the plugin, if any. Will be NSNull if nothing has been published. Will be nil if the plugin has not been registered.

Reimplemented in FlutterEngine, and FlutterViewController.


The documentation for this protocol was generated from the following files: