Flutter Engine
The Flutter Engine
|
Public Attributes | |
opaque | |
transparent | |
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.
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.
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
transactions. Consider using this
FragmentTransparencyMode
if you intend to switch Fragment
s at runtime that contain a Flutter UI.
Definition at line 40 of file TransparencyMode.java.