Class PlatformChannel
- java.lang.Object
-
- io.flutter.embedding.engine.systemchannels.PlatformChannel
-
public class PlatformChannel extends Object
System channel that receives requests for host platform behavior, e.g., haptic and sound effects, system chrome configurations, and clipboard interaction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPlatformChannel.AppSwitcherDescriptionThe color and label of an application that appears in Android's app switcher, AKA recents screen.static classPlatformChannel.Brightnessstatic classPlatformChannel.ClipboardContentFormatData formats of clipboard content.static classPlatformChannel.DeviceOrientationThe possible desired orientations of a Flutter application.static classPlatformChannel.HapticFeedbackTypeThe types of haptic feedback that the Android OS can generate on behalf of an application.static interfacePlatformChannel.PlatformMessageHandlerHandler that receives platform messages sent from Flutter to Android through a givenPlatformChannel.static classPlatformChannel.SoundTypeTypes of sounds the Android OS can play on behalf of an application.static classPlatformChannel.SystemChromeStyleThe color and brightness of system chrome, e.g., status bar and system navigation bar.static classPlatformChannel.SystemUiModeThe set of Android system fullscreen modes as perceived by the Flutter application.static classPlatformChannel.SystemUiOverlayThe set of Android system UI overlays as perceived by the Flutter application.
-
Field Summary
Fields Modifier and Type Field Description MethodChannelchannel
-
Constructor Summary
Constructors Constructor Description PlatformChannel(DartExecutor dartExecutor)Constructs aPlatformChannelthat connects Android to the Dart code running indartExecutor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetPlatformMessageHandler(PlatformChannel.PlatformMessageHandler platformMessageHandler)Sets thePlatformChannel.PlatformMessageHandlerwhich receives all events and requests that are parsed from the underlying platform channel.voidsystemChromeChanged(boolean overlaysAreVisible)Informs Flutter of a change in the SystemUI overlays.
-
-
-
Field Detail
-
channel
@NonNull public final MethodChannel channel
-
-
Constructor Detail
-
PlatformChannel
public PlatformChannel(@NonNull DartExecutor dartExecutor)Constructs aPlatformChannelthat connects Android to the Dart code running indartExecutor.The given
dartExecutoris permitted to be idle or executing code.See
DartExecutor.
-
-
Method Detail
-
setPlatformMessageHandler
public void setPlatformMessageHandler(@Nullable PlatformChannel.PlatformMessageHandler platformMessageHandler)Sets thePlatformChannel.PlatformMessageHandlerwhich receives all events and requests that are parsed from the underlying platform channel.
-
systemChromeChanged
public void systemChromeChanged(boolean overlaysAreVisible)
Informs Flutter of a change in the SystemUI overlays.
-
-