Interface PlatformViewsChannel.PlatformViewsHandler

    • Method Detail

      • createForPlatformViewLayer

        void createForPlatformViewLayer​(@NonNull
                                        PlatformViewsChannel.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:
        request - The metadata sent from the framework.
      • createForTextureLayer

        long createForTextureLayer​(@NonNull
                                   PlatformViewsChannel.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:
        request - The metadata sent from the framework.
        Returns:
        The texture ID.
      • dispose

        void dispose​(int viewId)
        The Flutter application would like to dispose of an existing Android View.
      • offset

        void offset​(int viewId,
                    double top,
                    double left)
        The Flutter application would like to change the offset of an existing Android View.
      • setDirection

        void setDirection​(int viewId,
                          int direction)
        The Flutter application would like to change the layout direction of an existing Android View, i.e., platform view.
      • clearFocus

        void clearFocus​(int viewId)
        Clears the focus from the platform view with a give id if it is currently focused.
      • synchronizeToNativeViewHierarchy

        void 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.