Reland "Even more awaits"#184467
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates numerous asynchronous calls to use await across benchmarks, integration tests, and core widget logic, ensuring proper execution order and resource management. It also introduces _pasteTextWithReporting in EditableTextState to provide centralized error handling for clipboard paste operations. Review feedback identifies a potential double-paste issue in EditableTextState, suggests returning the Future from the paste action for improved testability, and recommends removing redundant vertical whitespace in test teardown blocks to maintain consistency with the repository's style guidelines.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/flutter/lib/src/widgets/editable_text.dart (5277-5278)
This logic causes a double paste operation when controls is not null. The default implementation of controls.handlePaste(this) already calls delegate.pasteText(SelectionChangedCause.toolbar). Calling _pasteTextWithReporting immediately after results in a second call to pasteText. Since _pasteTextWithReporting is the preferred way to call paste with error reporting in this PR, you should remove the redundant call to handlePaste.
await _pasteTextWithReporting(SelectionChangedCause.toolbar);dev/benchmarks/complex_layout/test_driver/scroll_perf_bad_test.dart (21-23)
The addition of extra blank lines inside the tearDownAll block is unnecessary and inconsistent with the repository's style of keeping short blocks concise. This pattern appears in several other test files in this PR as well. Please remove the extra vertical whitespace for better readability.
await driver.close();
References
- Optimize for readability: Code is read more often than it is written. Avoid unnecessary vertical whitespace in short blocks. (link)
packages/flutter/lib/src/widgets/editable_text.dart (6703)
The asynchronous call to _pasteTextWithReporting should be returned so that the action's completion can be tracked (e.g., in tests). Although the error reporting will still function, returning the Future is consistent with how asynchronous actions should behave in Flutter.
return state._pasteTextWithReporting(intent.cause);…ni/flutter into reland-more-awaits-fix
flutter/flutter@0f401ee...7245c3f 2026-04-03 engine-flutter-autoroll@skia.org Roll Skia from c07c67045b6d to 5d847ba5c4aa (1 revision) (flutter/flutter#184570) 2026-04-03 engine-flutter-autoroll@skia.org Roll Dart SDK from 3c7a79045b8b to 46f49142acd9 (1 revision) (flutter/flutter#184567) 2026-04-03 engine-flutter-autoroll@skia.org Roll ICU from ee5f27adc28b to ff7995a708a1 (5 revisions) (flutter/flutter#184566) 2026-04-03 engine-flutter-autoroll@skia.org Roll Skia from 9ae8231be181 to c07c67045b6d (4 revisions) (flutter/flutter#184562) 2026-04-03 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from BFLjk6Uwd0gs_Hkdk... to PpL3Bn2YMb2h9LbdK... (flutter/flutter#184556) 2026-04-03 engine-flutter-autoroll@skia.org Roll Skia from 0566b2f5f0d1 to 9ae8231be181 (1 revision) (flutter/flutter#184547) 2026-04-03 engine-flutter-autoroll@skia.org Roll Dart SDK from 6008eaddd589 to 3c7a79045b8b (3 revisions) (flutter/flutter#184551) 2026-04-03 evanwall@buffalo.edu Fix wide gamut macos integration test (flutter/flutter#184427) 2026-04-02 jakemac@google.com forward an application name to DDS (flutter/flutter#184459) 2026-04-02 engine-flutter-autoroll@skia.org Roll Skia from 973117cfa875 to 0566b2f5f0d1 (8 revisions) (flutter/flutter#184534) 2026-04-02 97480502+b-luk@users.noreply.github.com Support different joins for stroked rects in uber_sdf, fix incorrect aa (flutter/flutter#184395) 2026-04-02 bkonyi@google.com [ Widget Preview ] Handle collections and records in custom preview annotations (flutter/flutter#184518) 2026-04-02 47866232+chunhtai@users.noreply.github.com Moves android_semantics_integration_test out of staging (flutter/flutter#184079) 2026-04-02 engine-flutter-autoroll@skia.org Roll Packages from b3fcf14 to 66bf7ec (4 revisions) (flutter/flutter#184514) 2026-04-02 rmolivares@renzo-olivares.dev Fix line breaks being lost when copying after selection gesture in SelectableRegion (flutter/flutter#184421) 2026-04-02 15619084+vashworth@users.noreply.github.com Add plugin version to SwiftPM package symlink directory (flutter/flutter#183668) 2026-04-02 34871572+gmackall@users.noreply.github.com Add our own wrapper for `CommonExtension` due to change in signature from 8.x->9.0 (flutter/flutter#184433) 2026-04-02 dbebawy@users.noreply.github.com [Android] Use EdgeToEdge.enable/WindowCompat for edge-to-edge mode instead of deprecated View flags (flutter/flutter#183072) 2026-04-02 dacoharkes@google.com [data_assets] Cleanup tests (flutter/flutter#184209) 2026-04-02 okorohelijah@google.com Enable SPM by default on Stable (flutter/flutter#184495) 2026-04-02 engine-flutter-autoroll@skia.org Roll Dart SDK from d84bdfeb45eb to 6008eaddd589 (2 revisions) (flutter/flutter#184513) 2026-04-02 victorsanniay@gmail.com Reland "Even more awaits" (flutter/flutter#184467) 2026-04-02 engine-flutter-autoroll@skia.org Roll Skia from bb9fd8653739 to 973117cfa875 (2 revisions) (flutter/flutter#184498) 2026-04-02 bkonyi@google.com [ Widget Preview ] Use analysis server for widget preview detection (flutter/flutter#184473) 2026-04-02 srawlins@google.com [web_ui] Fix avoid_type_to_string lint violation (flutter/flutter#184342) 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 louisehsu@google.com,stuartmorgan@google.com 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
PR: flutter#184042 Revert: flutter#184429 Fixes flutter#184315 Part of flutter#181513 --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
…r#11427) flutter/flutter@0f401ee...7245c3f 2026-04-03 engine-flutter-autoroll@skia.org Roll Skia from c07c67045b6d to 5d847ba5c4aa (1 revision) (flutter/flutter#184570) 2026-04-03 engine-flutter-autoroll@skia.org Roll Dart SDK from 3c7a79045b8b to 46f49142acd9 (1 revision) (flutter/flutter#184567) 2026-04-03 engine-flutter-autoroll@skia.org Roll ICU from ee5f27adc28b to ff7995a708a1 (5 revisions) (flutter/flutter#184566) 2026-04-03 engine-flutter-autoroll@skia.org Roll Skia from 9ae8231be181 to c07c67045b6d (4 revisions) (flutter/flutter#184562) 2026-04-03 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from BFLjk6Uwd0gs_Hkdk... to PpL3Bn2YMb2h9LbdK... (flutter/flutter#184556) 2026-04-03 engine-flutter-autoroll@skia.org Roll Skia from 0566b2f5f0d1 to 9ae8231be181 (1 revision) (flutter/flutter#184547) 2026-04-03 engine-flutter-autoroll@skia.org Roll Dart SDK from 6008eaddd589 to 3c7a79045b8b (3 revisions) (flutter/flutter#184551) 2026-04-03 evanwall@buffalo.edu Fix wide gamut macos integration test (flutter/flutter#184427) 2026-04-02 jakemac@google.com forward an application name to DDS (flutter/flutter#184459) 2026-04-02 engine-flutter-autoroll@skia.org Roll Skia from 973117cfa875 to 0566b2f5f0d1 (8 revisions) (flutter/flutter#184534) 2026-04-02 97480502+b-luk@users.noreply.github.com Support different joins for stroked rects in uber_sdf, fix incorrect aa (flutter/flutter#184395) 2026-04-02 bkonyi@google.com [ Widget Preview ] Handle collections and records in custom preview annotations (flutter/flutter#184518) 2026-04-02 47866232+chunhtai@users.noreply.github.com Moves android_semantics_integration_test out of staging (flutter/flutter#184079) 2026-04-02 engine-flutter-autoroll@skia.org Roll Packages from b3fcf14 to 66bf7ec (4 revisions) (flutter/flutter#184514) 2026-04-02 rmolivares@renzo-olivares.dev Fix line breaks being lost when copying after selection gesture in SelectableRegion (flutter/flutter#184421) 2026-04-02 15619084+vashworth@users.noreply.github.com Add plugin version to SwiftPM package symlink directory (flutter/flutter#183668) 2026-04-02 34871572+gmackall@users.noreply.github.com Add our own wrapper for `CommonExtension` due to change in signature from 8.x->9.0 (flutter/flutter#184433) 2026-04-02 dbebawy@users.noreply.github.com [Android] Use EdgeToEdge.enable/WindowCompat for edge-to-edge mode instead of deprecated View flags (flutter/flutter#183072) 2026-04-02 dacoharkes@google.com [data_assets] Cleanup tests (flutter/flutter#184209) 2026-04-02 okorohelijah@google.com Enable SPM by default on Stable (flutter/flutter#184495) 2026-04-02 engine-flutter-autoroll@skia.org Roll Dart SDK from d84bdfeb45eb to 6008eaddd589 (2 revisions) (flutter/flutter#184513) 2026-04-02 victorsanniay@gmail.com Reland "Even more awaits" (flutter/flutter#184467) 2026-04-02 engine-flutter-autoroll@skia.org Roll Skia from bb9fd8653739 to 973117cfa875 (2 revisions) (flutter/flutter#184498) 2026-04-02 bkonyi@google.com [ Widget Preview ] Use analysis server for widget preview detection (flutter/flutter#184473) 2026-04-02 srawlins@google.com [web_ui] Fix avoid_type_to_string lint violation (flutter/flutter#184342) 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 louisehsu@google.com,stuartmorgan@google.com 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
PR: #184042
Revert: #184429
Fixes #184315
Part of #181513