Skip to content

Conversation

@chingjun
Copy link
Contributor

Framework side declaration for go/flutter-locale-split.

@chingjun chingjun requested a review from GaryQian February 26, 2021 08:08
@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Feb 26, 2021
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla google-cla bot added the cla: yes label Feb 26, 2021
/// specified, the current system locale is used instead.
static const MethodChannel localization = OptionalMethodChannel(
'flutter/localization',
JSONMethodCodec(),
Copy link
Contributor

@GaryQian GaryQian Feb 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing on opinion of a reviewer I had on platform channels:

We should avoid unnecessary use of JSON codec if possible. If the contents can be passed with StandardMethodCodec, we prefer that over the extra layer of JSON parsing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline. This is actually an existing channel that uses JSON codec already.

Copy link
Contributor

@GaryQian GaryQian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with caveat of reviewing the codec.

@chingjun chingjun merged commit 75ad491 into flutter:master Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants