public class PlatformChannel extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PlatformChannel.AppSwitcherDescription
The color and label of an application that appears in Android's app switcher, AKA
recents screen.
|
static class |
PlatformChannel.Brightness |
static class |
PlatformChannel.ClipboardContentFormat
Data formats of clipboard content.
|
static class |
PlatformChannel.DeviceOrientation
The possible desired orientations of a Flutter application.
|
static class |
PlatformChannel.HapticFeedbackType
The types of haptic feedback that the Android OS can generate on behalf
of an application.
|
static interface |
PlatformChannel.PlatformMessageHandler
Handler that receives platform messages sent from Flutter to Android
through a given
PlatformChannel . |
static class |
PlatformChannel.SoundType
Types of sounds the Android OS can play on behalf of an application.
|
static class |
PlatformChannel.SystemChromeStyle
The color and brightness of system chrome, e.g., status bar and system navigation bar.
|
static class |
PlatformChannel.SystemUiOverlay
The set of Android system UI overlays as perceived by the Flutter application.
|
Modifier and Type | Field and Description |
---|---|
MethodChannel |
channel |
Constructor and Description |
---|
PlatformChannel(DartExecutor dartExecutor)
Constructs a
PlatformChannel that connects Android to the Dart code
running in dartExecutor . |
Modifier and Type | Method and Description |
---|---|
void |
setPlatformMessageHandler(PlatformChannel.PlatformMessageHandler platformMessageHandler)
Sets the
PlatformChannel.PlatformMessageHandler which receives all events and requests
that are parsed from the underlying platform channel. |
@NonNull public final MethodChannel channel
public PlatformChannel(@NonNull DartExecutor dartExecutor)
PlatformChannel
that connects Android to the Dart code
running in dartExecutor
.
The given dartExecutor
is permitted to be idle or executing code.
See DartExecutor
.public void setPlatformMessageHandler(@Nullable PlatformChannel.PlatformMessageHandler platformMessageHandler)
PlatformChannel.PlatformMessageHandler
which receives all events and requests
that are parsed from the underlying platform channel.