Package io.flutter.embedding.engine.systemchannels

## 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 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.SystemUiMode` | The set of Android system fullscreen modes as perceived by the Flutter application.
    `static class` | `PlatformChannel.SystemUiOverlay` | The set of Android system UI overlays as perceived by the Flutter application.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `MethodChannel` | `channel` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PlatformChannel​(DartExecutor dartExecutor)` | Constructs a `PlatformChannel` that connects Android to the Dart code running in `dartExecutor`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `setPlatformMessageHandler​(PlatformChannel.PlatformMessageHandler platformMessageHandler)` | Sets the `PlatformChannel.PlatformMessageHandler` which receives all events and requests that are parsed from the underlying platform channel.
    `void` | `systemChromeChanged​(boolean overlaysAreVisible)` | Informs Flutter of a change in the SystemUI overlays.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### channel

          @NonNull
          public final MethodChannel channel

  - ### Constructor Detail

    - #### PlatformChannel

          public PlatformChannel​(@NonNull
                                 DartExecutor dartExecutor)

      Constructs a `PlatformChannel` that connects Android to the Dart code running in `dartExecutor`.

      The given `dartExecutor` is permitted to be idle or executing code.

      See `DartExecutor`.

  - ### Method Detail

    - #### setPlatformMessageHandler

          public void setPlatformMessageHandler​(@Nullable
                                                PlatformChannel.PlatformMessageHandler platformMessageHandler)

      Sets the `PlatformChannel.PlatformMessageHandler` which 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.