Use utf8.encode() instead of longer const Utf8Encoder.convert()#130567
Merged
mkustermann merged 4 commits intoflutter:masterfrom Jul 24, 2023
Merged
Use utf8.encode() instead of longer const Utf8Encoder.convert()#130567mkustermann merged 4 commits intoflutter:masterfrom
mkustermann merged 4 commits intoflutter:masterfrom
Conversation
sstrickl
requested changes
Jul 14, 2023
Contributor
There was a problem hiding this comment.
Suggested change
| /// using [ByteData.sublistView]. Lists of bytes can be used with APIs that | |
| /// using [Uint8List.sublistView]. Lists of bytes can be used with APIs that |
sstrickl
approved these changes
Jul 14, 2023
Member
|
(Triage): @mkustermann Is this ready to be submitted? |
The change in [0] has propagated now everywhere, so we can use `utf8.encode()` instead of the longer `const Utf8Encoder.convert()`. Also it cleans up code like ``` TypedData bytes; bytes.buffer.asByteData(); ``` as that is not guaranteed to be correct, the correct version would be ``` TypedData bytes; bytes.buffer.asByteData(bytes.offsetInBytes, bytes.lengthInBytes); ``` a shorter hand for that is: ``` TypedData bytes; ByteData.sublistView(bytes); ``` [0] dart-lang/sdk#52801
Member
Author
Yes. Merging. (Apologies, I was a few days OOO) |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jul 24, 2023
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Jul 24, 2023
flutter/flutter@a8c8c55...d7ed5dc 2023-07-24 [email protected] Roll Flutter Engine from 4734a709cbf2 to aa876f6bec69 (2 revisions) (flutter/flutter#131190) 2023-07-24 [email protected] Use utf8.encode() instead of longer const Utf8Encoder.convert() (flutter/flutter#130567) 2023-07-24 [email protected] Roll Flutter Engine from 402bceec81f4 to 4734a709cbf2 (2 revisions) (flutter/flutter#131175) 2023-07-24 [email protected] Roll Flutter Engine from c2c54f6406df to 402bceec81f4 (1 revision) (flutter/flutter#131174) 2023-07-24 [email protected] Roll Flutter Engine from 35eab1bcf335 to c2c54f6406df (2 revisions) (flutter/flutter#131173) 2023-07-24 [email protected] Roll Flutter Engine from 2ec1183e0dc3 to 35eab1bcf335 (1 revision) (flutter/flutter#131169) 2023-07-24 [email protected] Roll Flutter Engine from b314a29830f8 to 2ec1183e0dc3 (1 revision) (flutter/flutter#131167) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu
pushed a commit
to LouiseHsu/flutter
that referenced
this pull request
Jul 31, 2023
…ter#130567) The change in [0] has propagated now everywhere, so we can use `utf8.encode()` instead of the longer `const Utf8Encoder.convert()`. Also it cleans up code like ``` TypedData bytes; bytes.buffer.asByteData(); ``` as that is not guaranteed to be correct, the correct version would be ``` TypedData bytes; bytes.buffer.asByteData(bytes.offsetInBytes, bytes.lengthInBytes); ``` a shorter hand for that is: ``` TypedData bytes; ByteData.sublistView(bytes); ``` [0] dart-lang/sdk#52801
vashworth
pushed a commit
to vashworth/flutter
that referenced
this pull request
Aug 2, 2023
…ter#130567) The change in [0] has propagated now everywhere, so we can use `utf8.encode()` instead of the longer `const Utf8Encoder.convert()`. Also it cleans up code like ``` TypedData bytes; bytes.buffer.asByteData(); ``` as that is not guaranteed to be correct, the correct version would be ``` TypedData bytes; bytes.buffer.asByteData(bytes.offsetInBytes, bytes.lengthInBytes); ``` a shorter hand for that is: ``` TypedData bytes; ByteData.sublistView(bytes); ``` [0] dart-lang/sdk#52801
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change in [0] has propagated now everywhere, so we can use
utf8.encode()instead of the longerconst Utf8Encoder.convert().Also it cleans up code like
as that is not guaranteed to be correct, the correct version would be
a shorter hand for that is:
[0] dart-lang/sdk#52801