Class FlutterSurfaceView

    • Constructor Detail

      • FlutterSurfaceView

        public FlutterSurfaceView​(@NonNull
                                  Context context)
        Constructs a FlutterSurfaceView programmatically, without any XML attributes.
      • FlutterSurfaceView

        public FlutterSurfaceView​(@NonNull
                                  Context context,
                                  boolean renderTransparently)
        Constructs a FlutterSurfaceView programmatically, without any XML attributes, and with control over whether or not this FlutterSurfaceView renders with transparency.
      • FlutterSurfaceView

        public FlutterSurfaceView​(@NonNull
                                  Context context,
                                  @NonNull
                                  AttributeSet attrs)
        Constructs a FlutterSurfaceView in an XML-inflation-compliant manner.
    • Method Detail

      • getAttachedRenderer

        @Nullable
        public FlutterRenderer getAttachedRenderer()
        Description copied from interface: RenderSurface
        Returns the FlutterRenderer that is attached to this RenderSurface, or null if no FlutterRenderer is currently attached.
        Specified by:
        getAttachedRenderer in interface RenderSurface
      • attachToRenderer

        public void attachToRenderer​(@NonNull
                                     FlutterRenderer flutterRenderer)
        Invoked by the owner of this FlutterSurfaceView when it wants to begin rendering a Flutter UI to this FlutterSurfaceView.

        If an Android Surface is available, this method will give that Surface to the given FlutterRenderer to begin rendering Flutter's UI to this FlutterSurfaceView.

        If no Android Surface is available yet, this FlutterSurfaceView will wait until a Surface becomes available and then give that Surface to the given FlutterRenderer to begin rendering Flutter's UI to this FlutterSurfaceView.

        Specified by:
        attachToRenderer in interface RenderSurface
      • detachFromRenderer

        public void detachFromRenderer()
        Invoked by the owner of this FlutterSurfaceView when it no longer wants to render a Flutter UI to this FlutterSurfaceView.

        This method will cease any on-going rendering from Flutter to this FlutterSurfaceView.

        Specified by:
        detachFromRenderer in interface RenderSurface
      • pause

        public void pause()
        Invoked by the owner of this FlutterSurfaceView when it should pause rendering Flutter UI to this FlutterSurfaceView.
        Specified by:
        pause in interface RenderSurface