#import <FlutterPlugin.h>
Instance Methods | |
| (void) | - publish: |
| (void) | - addMethodCallDelegate:channel: |
| (void) | - addApplicationDelegate: |
| (void) | - addSceneDelegate: |
| (NSString *) | - lookupKeyForAsset: |
| (NSString *) | - lookupKeyForAsset:fromPackage: |
Instance Methods inherited from <FlutterBaseRegistrar> | |
| (NSObject< FlutterBinaryMessenger > *) | - messenger |
| (NSObject< FlutterTextureRegistry > *) | - textures |
| (void) | - registerViewFactory:withId: |
| (void) | - registerViewFactory:withId:gestureRecognizersBlockingPolicy: |
Properties | |
| UIViewController * | viewController |
Registration context for a single FlutterPlugin, providing a one stop shop for the plugin to access contextual information and register callbacks for various application events.
Registrars are obtained from a FlutterPluginRegistry which keeps track of the identity of registered plugins and provides basic support for cross-plugin coordination.
Definition at line 349 of file FlutterPlugin.h.
| - (void) addApplicationDelegate: | ("Disallowed in plugins used in app extensions") | NS_EXTENSION_UNAVAILABLE_IOS |
Registers the plugin as a receiver of UIApplicationDelegate calls.
| delegate | The receiving object, such as the plugin's main class. |
| - (void) addMethodCallDelegate: | (NSObject< FlutterPlugin > *) | delegate | |
| channel: | (FlutterMethodChannel *) | channel | |
Registers the plugin as a receiver of incoming method calls from the Dart side on the specified FlutterMethodChannel.
| delegate | The receiving object, such as the plugin's main class. |
| channel | The channel |
| - (void) addSceneDelegate: | (ios(13.0)) | API_AVAILABLE |
Registers the plugin as a receiver of UISceneDelegate and UIWindowSceneDelegate calls.
| delegate | The receiving object, such as the plugin's main class. |
| - (NSString*) lookupKeyForAsset: | (NSString *) | asset |
Returns the file name for the given asset. The returned file name can be used to access the asset in the application's main bundle.
| asset | The name of the asset. The name can be hierarchical. |
| - (NSString*) lookupKeyForAsset: | (NSString *) | asset | |
| fromPackage: | (NSString *) | package | |
Returns the file name for the given asset which originates from the specified package. The returned file name can be used to access the asset in the application's main bundle.
| asset | The name of the asset. The name can be hierarchical. |
| package | The name of the package from which the asset originates. |
| - (void) publish: | (NSObject *) | value |
Publishes a value for external use of the plugin.
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.
The published value will be available from the FlutterPluginRegistry. Repeated calls overwrite any previous publication.
| value | The value to be published. |
|
readatomicassign |
The UIViewController whose view is displaying Flutter content.
The plugin typically should not store a strong reference to this view controller.
This property is provided for backwards compatibility for apps that assume a single view, and will eventually be replaced by the multi-view API variant.
This property may be |nil|, for instance in a headless environment, or when the underlying Flutter engine is deallocated.
Definition at line 363 of file FlutterPlugin.h.