Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Attributes | List of all members
io.flutter.embedding.android.TransparencyMode Enum Reference

Public Attributes

 opaque
 
 transparent
 

Detailed Description

Transparency mode for a Flutter UI.

TransparencyMode impacts the visual behavior and performance of a FlutterSurfaceView, which is displayed when a Flutter UI uses RenderMode#surface.

TransparencyMode does not impact FlutterTextureView, which is displayed when a Flutter UI uses RenderMode#texture, because a FlutterTextureView automatically comes with transparency.

Definition at line 17 of file TransparencyMode.java.

Member Data Documentation

◆ opaque

io.flutter.embedding.android.TransparencyMode.opaque

Renders a Flutter UI without any transparency. This affects Flutter UI's with RenderMode#surface by introducing a base color of black, and places the FlutterSurfaceView's Window behind all other content.

In RenderMode#surface, this mode is the most performant and is a good choice for fullscreen Flutter UIs that will not undergo Fragment transactions. If this mode is used within a Fragment, and that Fragment is replaced by another one, a brief black flicker may be visible during the switch.

Definition at line 28 of file TransparencyMode.java.

◆ transparent

io.flutter.embedding.android.TransparencyMode.transparent

Renders a Flutter UI with transparency. This affects Flutter UI's in RenderMode#surface by allowing background transparency, and places the FlutterSurfaceView's Window on top of all other content.

In RenderMode#surface, this mode is less performant than opaque, but this mode avoids the black flicker problem that opaque has when going through
Fragment
transactions. Consider using this TransparencyMode if you intend to switch Fragments at runtime that contain a Flutter UI.

Definition at line 40 of file TransparencyMode.java.


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