public static interface PlatformChannel.PlatformMessageHandler
PlatformChannel.
To register a PlatformMessageHandler with a PlatformChannel, see PlatformChannel.setPlatformMessageHandler(PlatformMessageHandler).
| Modifier and Type | Method and Description |
|---|---|
boolean |
clipboardHasStrings()
The Flutter application would like to know if the clipboard currently contains a string that
can be pasted.
|
CharSequence |
getClipboardData(PlatformChannel.ClipboardContentFormat format)
The Flutter application would like to receive the current data in the clipboard and have it
returned in the given
format. |
void |
playSystemSound(PlatformChannel.SoundType soundType)
The Flutter application would like to play the given
soundType. |
void |
popSystemNavigator()
The Flutter application would like to pop the top item off of the Android app's navigation
back stack.
|
void |
restoreSystemUiOverlays()
The Flutter application would like to restore the visibility of system overlays to the last
set of overlays sent via
showSystemOverlays(List). |
void |
setApplicationSwitcherDescription(PlatformChannel.AppSwitcherDescription description)
The Flutter application would like to be displayed in Android's app switcher with the visual
representation described in the given
description. |
void |
setClipboardData(String text)
The Flutter application would like to set the current data in the clipboard to the given
text. |
void |
setPreferredOrientations(int androidOrientation)
The Flutter application would like to display in the given
androidOrientation. |
void |
setSystemUiOverlayStyle(PlatformChannel.SystemChromeStyle systemUiOverlayStyle)
The Flutter application would like the system chrome to present itself with the given
systemUiOverlayStyle, i.e., the given status bar and navigation bar colors and brightness. |
void |
showSystemOverlays(List<PlatformChannel.SystemUiOverlay> overlays)
The Flutter application would like the Android system to display the given
overlays. |
void |
vibrateHapticFeedback(PlatformChannel.HapticFeedbackType feedbackType)
The Flutter application would like to play the given haptic
feedbackType. |
void playSystemSound(@NonNull
PlatformChannel.SoundType soundType)
soundType.void vibrateHapticFeedback(@NonNull
PlatformChannel.HapticFeedbackType feedbackType)
feedbackType.void setPreferredOrientations(int androidOrientation)
androidOrientation.void setApplicationSwitcherDescription(@NonNull
PlatformChannel.AppSwitcherDescription description)
description.
See the related Android documentation: https://developer.android.com/guide/components/activities/recents
void showSystemOverlays(@NonNull
List<PlatformChannel.SystemUiOverlay> overlays)
overlays.
PlatformChannel.SystemUiOverlay.TOP_OVERLAYS refers to system overlays such as the status bar,
while PlatformChannel.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 restoreSystemUiOverlays()
showSystemOverlays(List).
If showSystemOverlays(List) 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 setSystemUiOverlayStyle(@NonNull
PlatformChannel.SystemChromeStyle systemUiOverlayStyle)
systemUiOverlayStyle, i.e., the given status bar and navigation bar colors and brightness.void popSystemNavigator()
@Nullable CharSequence getClipboardData(@Nullable PlatformChannel.ClipboardContentFormat format)
format.void setClipboardData(@NonNull
String text)
text.boolean clipboardHasStrings()