Package io.flutter.embedding.engine.systemchannels

# Class PlatformViewsChannel

java.lang.Object
io.flutter.embedding.engine.systemchannels.PlatformViewsChannel

public class PlatformViewsChannel extends Object
System channel that sends 2-way communication between Flutter and Android to facilitate embedding of Android Views within a Flutter application.

Register a `PlatformViewsChannel.PlatformViewsHandler` to implement the Android side of this channel.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `PlatformViewsChannel.PlatformViewBufferResized`
  Allows to notify when a platform view buffer has been resized.
  `static class`
  `PlatformViewsChannel.PlatformViewBufferSize`
  The platform view buffer size.
  `static class`
  `PlatformViewsChannel.PlatformViewCreationRequest`
  Request sent from Flutter to create a new platform view.
  `static class`
  `PlatformViewsChannel.PlatformViewResizeRequest`
  Request sent from Flutter to resize a platform view.
  `static interface`
  `PlatformViewsChannel.PlatformViewsHandler`
  Handler that receives platform view messages sent from Flutter to Android through a given `PlatformViewsChannel`.
  `static class`
  `PlatformViewsChannel.PlatformViewTouch`
  The state of a touch event in Flutter within a platform view.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PlatformViewsChannel(DartExecutor dartExecutor)`
  Constructs a `PlatformViewsChannel` that connects Android to the Dart code running in `dartExecutor`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `invokeViewFocused(int viewId)`
  `void`
  `setPlatformViewsHandler(PlatformViewsChannel.PlatformViewsHandler handler)`
  Sets the `PlatformViewsChannel.PlatformViewsHandler` which receives all events and requests that are parsed from the underlying platform views channel.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PlatformViewsChannel

    public PlatformViewsChannel(@NonNull DartExecutor dartExecutor)
    Constructs a `PlatformViewsChannel` that connects Android to the Dart code running in `dartExecutor`.

    The given `dartExecutor` is permitted to be idle or executing code.

    See `DartExecutor`.

- ## Method Details

  - ### invokeViewFocused

    public void invokeViewFocused(int viewId)

  - ### setPlatformViewsHandler

    public void setPlatformViewsHandler(@Nullable PlatformViewsChannel.PlatformViewsHandler handler)
    Sets the `PlatformViewsChannel.PlatformViewsHandler` which receives all events and requests that are parsed from the underlying platform views channel.