Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | List of all members
<FlutterPlatformViewFactory> Protocol Reference

#include <FlutterPlatformViews.h>

Inheritance diagram for <FlutterPlatformViewFactory>:
MockFlutterPlatformFactory TestFlutterPlatformViewFactory TestPlatformViewFactory TextPlatformViewFactory

Instance Methods

(NSObject< FlutterPlatformView > *) - createWithFrame:viewIdentifier:arguments:
 
(NSObject< FlutterMessageCodec > *) - createArgsCodec
 
(nonnull NSView *) - createWithViewIdentifier:arguments:
 
(nullable NSObject< FlutterMessageCodec > *) - createArgsCodec
 

Detailed Description

Definition at line 26 of file FlutterPlatformViews.h.

Method Documentation

◆ createArgsCodec [1/2]

- (NSObject< FlutterMessageCodec > *) createArgsCodec
optional

Returns the FlutterMessageCodec for decoding the args parameter of createWithFrame.

Only needs to be implemented if createWithFrame needs an arguments parameter.

Reimplemented in TestFlutterPlatformViewFactory, and TextPlatformViewFactory.

◆ createArgsCodec [2/2]

- (nullable NSObject< FlutterMessageCodec > *) createArgsCodec
optional

Returns the FlutterMessageCodec for decoding the args parameter of createWithFrame.

Only implement this if createWithFrame needs an arguments parameter.

Reimplemented in TestFlutterPlatformViewFactory, and TextPlatformViewFactory.

◆ createWithFrame:viewIdentifier:arguments:

- (NSObject< FlutterPlatformView > *) createWithFrame: (CGRect)  frame
viewIdentifier: (int64_t)  viewId
arguments: (id _Nullable)  args 

Create a FlutterPlatformView.

Implemented by iOS code that expose a UIView for embedding in a Flutter app.

The implementation of this method should create a new UIView and return it.

Parameters
frameThe rectangle for the newly created UIView measured in points.
viewIdA unique identifier for this UIView.
argsParameters for creating the UIView sent from the Dart side of the Flutter app. If createArgsCodec is not implemented, or if no creation arguments were sent from the ␐Dart code, this will be null. Otherwise this will be the value sent from the Dart code as decoded by createArgsCodec.

Reimplemented in MockFlutterPlatformFactory, and TextPlatformViewFactory.

◆ createWithViewIdentifier:arguments:

- (nonnull NSView *) createWithViewIdentifier: (int64_t)  viewId
arguments: (nullable id args 

Create a Platform View which is an NSView.

A MacOS plugin should implement this method and return an NSView, which can be embedded in a Flutter App.

The implementation of this method should create a new NSView.

Parameters
viewIdA unique identifier for this view.
argsParameters for creating the view sent from the Dart side of the Flutter app. If createArgsCodec is not implemented, or if no creation arguments were sent from the Dart code, this will be null. Otherwise this will be the value sent from the Dart code as decoded by createArgsCodec.

Reimplemented in TestPlatformViewFactory, and TestFlutterPlatformViewFactory.


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