Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler Interface Reference

Public Member Functions

void createForPlatformViewLayer (@NonNull PlatformViewCreationRequest request)
 
long createForTextureLayer (@NonNull PlatformViewCreationRequest request)
 
void dispose (int viewId)
 
void resize ( @NonNull PlatformViewResizeRequest request, @NonNull PlatformViewBufferResized onComplete)
 
void offset (int viewId, double top, double left)
 
void onTouch (@NonNull PlatformViewTouch touch)
 
void setDirection (int viewId, int direction)
 
void clearFocus (int viewId)
 
void synchronizeToNativeViewHierarchy (boolean yes)
 

Static Public Attributes

static final long NON_TEXTURE_FALLBACK = -2
 

Detailed Description

Handler that receives platform view messages sent from Flutter to Android through a given PlatformViewsChannel.

To register a PlatformViewsHandler with a PlatformViewsChannel, see PlatformViewsChannel#setPlatformViewsHandler(PlatformViewsHandler).

Definition at line 288 of file PlatformViewsChannel.java.

Member Function Documentation

◆ clearFocus()

void io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.clearFocus ( int  viewId)

Clears the focus from the platform view with a give id if it is currently focused.

◆ createForPlatformViewLayer()

void io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.createForPlatformViewLayer ( @NonNull PlatformViewCreationRequest  request)

The Flutter application would like to display a new Android View, i.e., platform view.

The Android View is added to the view hierarchy. This view is rendered in the Flutter framework by a PlatformViewLayer.

Parameters
requestThe metadata sent from the framework.

◆ createForTextureLayer()

long io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.createForTextureLayer ( @NonNull PlatformViewCreationRequest  request)

The Flutter application would like to display a new Android View, i.e., platform view.

The Android View is added to the view hierarchy. This view is rendered in the Flutter framework by a TextureLayer.

Parameters
requestThe metadata sent from the framework.
Returns
The texture ID.

◆ dispose()

void io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.dispose ( int  viewId)

The Flutter application would like to dispose of an existing Android View.

◆ offset()

void io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.offset ( int  viewId,
double  top,
double  left 
)

The Flutter application would like to change the offset of an existing Android View.

◆ onTouch()

void io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.onTouch ( @NonNull PlatformViewTouch  touch)

The user touched a platform view within Flutter.

Touch data is reported in touch.

◆ resize()

void io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.resize ( @NonNull PlatformViewResizeRequest  request,
@NonNull PlatformViewBufferResized  onComplete 
)

The Flutter application would like to resize an existing Android View.

Parameters
requestThe request to resize the platform view.
onCompleteOnce the resize is completed, this is the handler to notify the size of the platform view buffer.

◆ setDirection()

void io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.setDirection ( int  viewId,
int  direction 
)

The Flutter application would like to change the layout direction of an existing Android View, i.e., platform view.

◆ synchronizeToNativeViewHierarchy()

void io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.synchronizeToNativeViewHierarchy ( boolean  yes)

Whether the render surface of FlutterView should be converted to a
FlutterImageView
when a PlatformView is added.

This is done to syncronize the rendering of the PlatformView and the FlutterView. Defaults to true.

Member Data Documentation

◆ NON_TEXTURE_FALLBACK

final long io.flutter.embedding.engine.systemchannels.PlatformViewsChannel.PlatformViewsHandler.NON_TEXTURE_FALLBACK = -2
static

Definition at line 296 of file PlatformViewsChannel.java.


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