Package io.flutter.embedding.engine.systemchannels

# Class LocalizationChannel

java.lang.Object
io.flutter.embedding.engine.systemchannels.LocalizationChannel

public class LocalizationChannel extends Object
Sends the platform's locales to Dart.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `LocalizationChannel.LocalizationMessageHandler`
  Handler that receives platform messages sent from Flutter to Android through a given `PlatformChannel`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final MethodChannel`
  `channel`
  `final MethodChannel.MethodCallHandler`
  `handler`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LocalizationChannel(DartExecutor dartExecutor)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `sendLocales(List<Locale> locales)`
  Send the given `locales` to Dart.
  `void`
  `setLocalizationMessageHandler(LocalizationChannel.LocalizationMessageHandler localizationMessageHandler)`
  Sets the `LocalizationChannel.LocalizationMessageHandler` which receives all events and requests that are parsed from the underlying platform channel.

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

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

- ## Field Details

  - ### channel

    @NonNull public final MethodChannel channel

  - ### handler

    @NonNull @VisibleForTesting public final MethodChannel.MethodCallHandler handler

- ## Constructor Details

  - ### LocalizationChannel

    public LocalizationChannel(@NonNull DartExecutor dartExecutor)

- ## Method Details

  - ### setLocalizationMessageHandler

    public void setLocalizationMessageHandler(@Nullable LocalizationChannel.LocalizationMessageHandler localizationMessageHandler)
    Sets the `LocalizationChannel.LocalizationMessageHandler` which receives all events and requests that are parsed from the underlying platform channel.

  - ### sendLocales

    public void sendLocales(@NonNull List<Locale> locales)
    Send the given `locales` to Dart.