File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
packages/flutter/lib/src/services Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -344,4 +344,20 @@ class SystemChannels {
344344 'flutter/deferredcomponent' ,
345345 StandardMethodCodec (),
346346 );
347+
348+ /// A JSON [MethodChannel] for localization.
349+ ///
350+ /// The following outgoing methods are defined for this channel (invoked using
351+ /// [OptionalMethodChannel.invokeMethod] ):
352+ ///
353+ /// * `Localization.getStringResource` : Obtains the native string resource
354+ /// for a specific locale. The argument is a [Map] with two keys, `key`
355+ /// giving a [String] which the resource is defined with, and an optional
356+ /// `locale` which is a [String] containing the BCP47 locale identifier of
357+ /// the locale requested. See [Locale.toLanguageTag]. When `locale` is not
358+ /// specified, the current system locale is used instead.
359+ static const MethodChannel localization = OptionalMethodChannel (
360+ 'flutter/localization' ,
361+ JSONMethodCodec (),
362+ );
347363}
You can’t perform that action at this time.
0 commit comments