Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
75ad491f
Unverified
Commit
75ad491f
authored
Feb 26, 2021
by
Lau Ching Jun
Committed by
GitHub
Feb 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add system channel to access the localization plugin. (#76847)
parent
dc1cb297
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
system_channels.dart
packages/flutter/lib/src/services/system_channels.dart
+16
-0
No files found.
packages/flutter/lib/src/services/system_channels.dart
View file @
75ad491f
...
@@ -344,4 +344,20 @@ class SystemChannels {
...
@@ -344,4 +344,20 @@ class SystemChannels {
'flutter/deferredcomponent'
,
'flutter/deferredcomponent'
,
StandardMethodCodec
(),
StandardMethodCodec
(),
);
);
/// A JSON [MethodChannel] for localization.
///
/// The following outgoing methods are defined for this channel (invoked using
/// [OptionalMethodChannel.invokeMethod]):
///
/// * `Localization.getStringResource`: Obtains the native string resource
/// for a specific locale. The argument is a [Map] with two keys, `key`
/// giving a [String] which the resource is defined with, and an optional
/// `locale` which is a [String] containing the BCP47 locale identifier of
/// the locale requested. See [Locale.toLanguageTag]. When `locale` is not
/// specified, the current system locale is used instead.
static
const
MethodChannel
localization
=
OptionalMethodChannel
(
'flutter/localization'
,
JSONMethodCodec
(),
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment