Flutter Engine
The Flutter Engine
|
Public Member Functions | |
void | playSystemSound (@NonNull SoundType soundType) |
void | vibrateHapticFeedback (@NonNull HapticFeedbackType feedbackType) |
void | setPreferredOrientations (int androidOrientation) |
void | setApplicationSwitcherDescription (@NonNull AppSwitcherDescription description) |
void | showSystemOverlays (@NonNull List< SystemUiOverlay > overlays) |
void | showSystemUiMode (@NonNull SystemUiMode mode) |
void | setSystemUiChangeListener () |
void | restoreSystemUiOverlays () |
void | setSystemUiOverlayStyle (@NonNull SystemChromeStyle systemUiOverlayStyle) |
default void | setFrameworkHandlesBack (boolean frameworkHandlesBack) |
void | popSystemNavigator () |
CharSequence | getClipboardData (@Nullable ClipboardContentFormat format) |
void | setClipboardData (@NonNull String text) |
boolean | clipboardHasStrings () |
void | share (@NonNull String text) |
Handler that receives platform messages sent from Flutter to Android through a given PlatformChannel
.
To register a PlatformMessageHandler
with a PlatformChannel
, see PlatformChannel#setPlatformMessageHandler(PlatformMessageHandler)
.
Definition at line 445 of file PlatformChannel.java.
boolean io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.clipboardHasStrings | ( | ) |
The Flutter application would like to know if the clipboard currently contains a string that can be pasted.
CharSequence io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.getClipboardData | ( | @Nullable ClipboardContentFormat | format | ) |
The Flutter application would like to receive the current data in the clipboard and have it returned in the given format
.
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.playSystemSound | ( | @NonNull SoundType | soundType | ) |
The Flutter application would like to play the given soundType
.
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.popSystemNavigator | ( | ) |
The Flutter application would like to pop the top item off of the Android app's navigation back stack.
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.restoreSystemUiOverlays | ( | ) |
The Flutter application would like to restore the visibility of system overlays to the last set of overlays sent via showSystemOverlays(List)
or showSystemUiMode(SystemUiMode)
.
If showSystemOverlays(List)
or showSystemUiMode(SystemUiMode)
has yet to be called, then a default system overlay appearance is desired:
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.setApplicationSwitcherDescription | ( | @NonNull AppSwitcherDescription | description | ) |
The Flutter application would like to be displayed in Android's app switcher with the visual representation described in the given description
.
See the related Android documentation: https://developer.android.com/guide/components/activities/recents
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.setClipboardData | ( | @NonNull String | text | ) |
The Flutter application would like to set the current data in the clipboard to the given text
.
|
inline |
The Flutter application would or would not like to handle navigation pop events itself.
Relevant for registering and unregistering the app's OnBackInvokedCallback for the Predictive Back feature, for example as in io.flutter.embedding.android.FlutterActivity
.
Definition at line 531 of file PlatformChannel.java.
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.setPreferredOrientations | ( | int | androidOrientation | ) |
The Flutter application would like to display in the given androidOrientation
.
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.setSystemUiChangeListener | ( | ) |
The Flutter application would like the Android system to notify the framework when the system ui visibility has changed.
This is relevant when using SystemUiMode
s for fullscreen applications, from which the system overlays can appear or disappear based on user input.
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.setSystemUiOverlayStyle | ( | @NonNull SystemChromeStyle | systemUiOverlayStyle | ) |
The Flutter application would like the system chrome to present itself with the given
, i.e., the given status bar and navigation bar colors and brightness.
systemUiOverlayStyle
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.share | ( | @NonNull String | text | ) |
The Flutter application would like to share the given text
using the Android standard intent action named Intent.ACTION_SEND
. See: https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.showSystemOverlays | ( | @NonNull List< SystemUiOverlay > | overlays | ) |
The Flutter application would like the Android system to display the given overlays
.
SystemUiOverlay#TOP_OVERLAYS
refers to system overlays such as the status bar, while SystemUiOverlay#BOTTOM_OVERLAYS
refers to system overlays such as the back/home/recents navigation on the bottom of the screen.
An empty list of overlays
should hide all system overlays.
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.showSystemUiMode | ( | @NonNull SystemUiMode | mode | ) |
The Flutter application would like the Android system to display the given mode
.
SystemUiMode#LEAN_BACK
refers to a fullscreen experience that restores system bars upon tapping anywhere in the application. This tap gesture is not received by the application.
SystemUiMode#IMMERSIVE
refers to a fullscreen experience that restores system bars upon swiping from the edge of the viewport. This swipe gesture is not recived by the application.
SystemUiMode#IMMERSIVE_STICKY
refers to a fullscreen experience that restores system bars upon swiping from the edge of the viewport. This swipe gesture is received by the application, in contrast to SystemUiMode#IMMERSIVE
.
SystemUiMode#EDGE_TO_EDGE
refers to a layout configuration that will consume the full viewport. This full screen experience does not hide status bars. These status bars can be set to transparent, making the buttons and icons hover over the fullscreen application.
void io.flutter.embedding.engine.systemchannels.PlatformChannel.PlatformMessageHandler.vibrateHapticFeedback | ( | @NonNull HapticFeedbackType | feedbackType | ) |
The Flutter application would like to play the given haptic feedbackType
.