-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Use utf8.encode() instead of longer const Utf8Encoder.convert() #130567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// using [ByteData.sublistView]. Lists of bytes can be used with APIs that | |
| /// using [Uint8List.sublistView]. Lists of bytes can be used with APIs that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Done!
|
(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
Yes. Merging. (Apologies, I was a few days OOO) |
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
…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
…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
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