Package io.flutter.embedding.engine.systemchannels

# Class PlatformViewCreationRequest

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

public class PlatformViewCreationRequest extends Object
Request sent from Flutter to create a new platform view.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `PlatformViewCreationRequest.RequestedDisplayMode`
  Platform view display modes that can be requested at creation time.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final int`
  `direction`
  The layout direction of the new platform view.
  `final PlatformViewCreationRequest.RequestedDisplayMode`
  `displayMode`
  `final double`
  `logicalHeight`
  The density independent height to display the platform view.
  `final double`
  `logicalLeft`
  The density independent left position to display the platform view.
  `final double`
  `logicalTop`
  The density independent top position to display the platform view.
  `final double`
  `logicalWidth`
  The density independent width to display the platform view.
  `final ByteBuffer`
  `params`
  Custom parameters that are unique to the desired platform view.
  `final int`
  `viewId`
  The ID of the platform view as seen by the Flutter side.
  `final String`
  `viewType`
  The type of Android `View` to create for this platform view.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PlatformViewCreationRequest(int viewId, String viewType, double logicalTop, double logicalLeft, double logicalWidth, double logicalHeight, int direction, PlatformViewCreationRequest.RequestedDisplayMode displayMode, ByteBuffer params)`
  Creates a request to construct a platform view with the given display mode.
  `PlatformViewCreationRequest(int viewId, String viewType, double logicalTop, double logicalLeft, double logicalWidth, double logicalHeight, int direction, ByteBuffer params)`
  Creates a request to construct a platform view.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static PlatformViewCreationRequest`
  `createHCPPRequest(int viewId, String viewType, int direction, ByteBuffer params)`
  `static PlatformViewCreationRequest`
  `createHybridCompositionRequest(int viewId, String viewType, int direction, ByteBuffer params)`
  `static PlatformViewCreationRequest`
  `createTLHCWithFallbackRequest(int viewId, String viewType, double top, double left, double width, double height, int direction, boolean hybridFallback, ByteBuffer params)`

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

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

- ## Field Details

  - ### viewId

    public final int viewId
    The ID of the platform view as seen by the Flutter side.

  - ### viewType

    @NonNull public final String viewType
    The type of Android `View` to create for this platform view.

  - ### logicalWidth

    public final double logicalWidth
    The density independent width to display the platform view.

  - ### logicalHeight

    public final double logicalHeight
    The density independent height to display the platform view.

  - ### logicalTop

    public final double logicalTop
    The density independent top position to display the platform view.

  - ### logicalLeft

    public final double logicalLeft
    The density independent left position to display the platform view.

  - ### direction

    public final int direction
    The layout direction of the new platform view.

    See `View.LAYOUT_DIRECTION_LTR` and `View.LAYOUT_DIRECTION_RTL`

  - ### displayMode

    public final PlatformViewCreationRequest.RequestedDisplayMode displayMode

  - ### params

    @Nullable public final ByteBuffer params
    Custom parameters that are unique to the desired platform view.

- ## Constructor Details

  - ### PlatformViewCreationRequest

    @VisibleForTesting public PlatformViewCreationRequest(int viewId, @NonNull String viewType, double logicalTop, double logicalLeft, double logicalWidth, double logicalHeight, int direction, @Nullable ByteBuffer params)
    Creates a request to construct a platform view. Prefer use of the mode-specific named constructors above where possible.

  - ### PlatformViewCreationRequest

    public PlatformViewCreationRequest(int viewId, @NonNull String viewType, double logicalTop, double logicalLeft, double logicalWidth, double logicalHeight, int direction, @Nullable PlatformViewCreationRequest.RequestedDisplayMode displayMode, @Nullable ByteBuffer params)
    Creates a request to construct a platform view with the given display mode. Prefer use of the mode-specific named constructors above where possible.

- ## Method Details

  - ### createHCPPRequest

    public static PlatformViewCreationRequest createHCPPRequest(int viewId, String viewType, int direction, ByteBuffer params)

  - ### createHybridCompositionRequest

    public static PlatformViewCreationRequest createHybridCompositionRequest(int viewId, String viewType, int direction, ByteBuffer params)

  - ### createTLHCWithFallbackRequest

    public static PlatformViewCreationRequest createTLHCWithFallbackRequest(int viewId, String viewType, double top, double left, double width, double height, int direction, boolean hybridFallback, ByteBuffer params)