Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
io.flutter.plugin.platform.PlatformViewFactory Class Referenceabstract
Inheritance diagram for io.flutter.plugin.platform.PlatformViewFactory:
dev.flutter.scenarios.SurfacePlatformViewFactory dev.flutter.scenarios.TextPlatformViewFactory dev.flutter.scenarios.TexturePlatformViewFactory

Public Member Functions

 PlatformViewFactory (@Nullable MessageCodec< Object > createArgsCodec)
 
abstract PlatformView create (Context context, int viewId, @Nullable Object args)
 
final MessageCodec< Object > getCreateArgsCodec ()
 

Detailed Description

Definition at line 12 of file PlatformViewFactory.java.

Constructor & Destructor Documentation

◆ PlatformViewFactory()

io.flutter.plugin.platform.PlatformViewFactory.PlatformViewFactory ( @Nullable MessageCodec< Object >  createArgsCodec)
inline
Parameters
createArgsCodecthe codec used to decode the args parameter of create.

Definition at line 16 of file PlatformViewFactory.java.

16 {
17 this.createArgsCodec = createArgsCodec;
18 }

Member Function Documentation

◆ create()

abstract PlatformView io.flutter.plugin.platform.PlatformViewFactory.create ( Context  context,
int  viewId,
@Nullable Object  args 
)
abstract

Creates a new Android view to be embedded in the Flutter hierarchy.

Parameters
contextthe context to be used when creating the view, this is different than FlutterView's context.
viewIdunique identifier for the created instance, this value is known on the Dart side.
argsarguments sent from the Flutter app. The bytes for this value are decoded using the createArgsCodec argument passed to the constructor. This is null if createArgsCodec was null, or no arguments were sent from the Flutter app.

◆ getCreateArgsCodec()

final MessageCodec< Object > io.flutter.plugin.platform.PlatformViewFactory.getCreateArgsCodec ( )
inline

Returns the codec to be used for decoding the args parameter of create.

Definition at line 35 of file PlatformViewFactory.java.

35 {
36 return createArgsCodec;
37 }

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