Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add TestWidgetsApp utility and refactor widget tests to use WidgetsApp#180456

Merged
auto-submit[bot] merged 14 commits intoflutter:masterfrom
rkishan516:cross-imports-test
Jan 29, 2026
Merged

Add TestWidgetsApp utility and refactor widget tests to use WidgetsApp#180456
auto-submit[bot] merged 14 commits intoflutter:masterfrom
rkishan516:cross-imports-test

Conversation

@rkishan516
Copy link
Contributor

This PR introduces a TestWidgetsApp utility class that provides a minimal WidgetsApp wrapper for widget tests, replacing direct usage of Directionality widgets.

part of: #177415

Changes

  • test_widgets_app.dart - A reusable TestWidgetsApp widget that wraps WidgetsApp with a builder pattern, providing Directionality, MediaQuery, and other app-level widgets that WidgetsApp provides.
  • gesture_detector_test.dart - Replaced 9 Directionality usages
  • mouse_region_test.dart - Replaced 13 Directionality usages
  • opacity_test.dart - Replaced 2 Directionality usages
  • slivers_evil_test.dart - Replaced 3 Directionality usages and removed redundant MediaQuery wrappers

Note

  • This PR updates golden test baselines for opacity_test.dart.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Jan 3, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a TestWidgetsApp utility to provide a minimal WidgetsApp for widget tests. Several test files have been refactored to use this new utility, replacing heavier widgets like MaterialApp, Scaffold, and Directionality. This simplifies the test setup and removes dependencies on the Material library. My review includes some suggestions to further improve the code by adding const modifiers for performance.

Comment on lines +2012 to +2017
feedback: Container(width: 20, height: 20, color: const Color(0xFF2196F3)),
childWhenDragging: Container(
width: 20,
height: 20,
color: const Color(0xFFFFEB3B),
),
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better performance, you can make these Container widgets const.

Suggested change
feedback: Container(width: 20, height: 20, color: const Color(0xFF2196F3)),
childWhenDragging: Container(
width: 20,
height: 20,
color: const Color(0xFFFFEB3B),
),
feedback: const Container(width: 20, height: 20, color: Color(0xFF2196F3)),
childWhenDragging: const Container(
width: 20,
height: 20,
color: Color(0xFFFFEB3B),
),

Copy link
Contributor

Choose a reason for hiding this comment

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

Not true Gemini!

opacity: 0.5,
child: Padding(
padding: EdgeInsets.all(5.0),
child: ColoredBox(color: Color(0xFF2196F3), child: SizedBox(height: 50)),
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better performance, you can make ColoredBox and SizedBox const. This will also allow the parent Padding to be const.

                    child: const ColoredBox(color: Color(0xFF2196F3), child: const SizedBox(height: 50)),

Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessary because Opacity is already const.

Comment on lines +206 to +209
child: ColoredBox(
color: Color(0xFFF44336),
child: SizedBox(height: 100, width: 100),
),
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This ColoredBox and its child SizedBox can be const. This would allow the parent Opacity, Positioned, and Stack widgets to be const as well, improving performance.

                  child: const ColoredBox(
                    color: Color(0xFFF44336),
                    child: const SizedBox(height: 100, width: 100),
                  ),

@rkishan516 rkishan516 requested a review from justinmc January 3, 2026 04:03
@rkishan516 rkishan516 force-pushed the cross-imports-test branch 2 times, most recently from 1899505 to 13c5da3 Compare January 3, 2026 04:30

@override
Widget build(BuildContext context) {
return WidgetsApp(
Copy link
Contributor

Choose a reason for hiding this comment

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

I ran into an issue writing tests with WidgetsApp whenever a descendant widget tries to insert an OverlayEntry into the root overlay because (I think) WidgetsApp doesn't create an Overlay by default unlike Material/CupertinoApp. This was the workaround:

WidgetsApp(
  ...
  pageRouteBuilder: <T>(RouteSettings settings, WidgetBuilder builder) {
    return PageRouteBuilder<T>(
      pageBuilder:
          (
            BuildContext context,
            Animation<double> animation,
            Animation<double> secondaryAnimation,
          ) => builder(context),
    );
  },
);

Maybe we can add this here as well so others don't run into this problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I have added it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. I also noticed that there is a test above that includes an Overlay now. Does this change here help? Or should we add an Overlay here so we don't need to include it in the test?

Copy link
Contributor

@navaronbracke navaronbracke Jan 15, 2026

Choose a reason for hiding this comment

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

In #180990 I also wanted to add a WidgetsApp for testing, which used a pageBuilder (not a pageRouteBuilder), but I suppose the code sample here is equivalent? (since it uses a stub PageRouteBuilder() )
Also, the child can be renamed to home and passed to WidgetsApp(home: home) ?

Copy link
Contributor Author

@rkishan516 rkishan516 Jan 17, 2026

Choose a reason for hiding this comment

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

Good catch. I also noticed that there is a test above that includes an Overlay now. Does this change here help? Or should we add an Overlay here so we don't need to include it in the test?

@justinmc I think we can add Overlay here, which will help in multiple instances.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In #180990 I also wanted to add a WidgetsApp for testing, which used a pageBuilder (not a pageRouteBuilder), but I suppose the code sample here is equivalent? (since it uses a stub PageRouteBuilder() )

Yes , its equivalent.

Also, the child can be renamed to home and passed to WidgetsApp(home: home) ?

Sure, can do.

@github-actions github-actions bot added the a: tests "flutter test", flutter_test, or one of our tests label Jan 6, 2026
@victorsanni victorsanni self-requested a review January 9, 2026 23:58
@justinmc justinmc mentioned this pull request Jan 14, 2026
9 tasks
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

Thanks for jumping on this! This is basically what I had in mind for TestWidgetsApp.

Looks good minus a few nits, but I see that there is a leak in text_field_test strangely. @rkishan516 any idea what would trigger that?

return tester.pumpWidget(
Directionality(
textDirection: TextDirection.ltr,
TestWidgetsApp(
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch that we can get rid of cases where Directionality is used instead of a WidgetsApp, I didn't think of that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, it will make widgets/ test lookwise more consistent.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm worried that replacing Directionality means bugs with TestWidgetsApp can propagate across the codebase. Or am I looking at this the wrong way? i.e If there is a bug with TestWidgetsApp (or its underlying widgets) that hasn't already been caught, using TestWidgetsApp everywhere stress tests it, making any bugs more likely to be caught?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we have many test already, any change in TestWidgetsApp will be stress tested. But something that is not covered in these tests and newly added can be a reason to introduce bug. So, IMO its 50-50 on both side.

Comment on lines +817 to +814
color: Colors.blue,
color: const Color(0xFF2196F3),
Copy link
Contributor

Choose a reason for hiding this comment

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

We may consider adding a TestColorBlue or something like that in the future, but this is fine for now. I'm not yet convinced we want to do that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Drive by comment: what about const Color(0xFF0000FF) ? I don't think the r,g channels matter here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I personally prefer using easier colors (e.g colors with only one channel, completely transparent etc). Using colors like above can be confusing to someone reading the code who might then think the complexity of the color is an indicator that it serves a non-trivial purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to single channel colors.

Comment on lines +2012 to +2017
feedback: Container(width: 20, height: 20, color: const Color(0xFF2196F3)),
childWhenDragging: Container(
width: 20,
height: 20,
color: const Color(0xFFFFEB3B),
),
Copy link
Contributor

Choose a reason for hiding this comment

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

Not true Gemini!

Comment on lines +2009 to +2003
MaterialApp(
home: Center(
child: Draggable<int>(
feedback: Container(width: 20, height: 20, color: Colors.blue),
childWhenDragging: Container(width: 20, height: 20, color: Colors.yellow),
child: ElevatedButton(child: const Text('Drag me'), onPressed: () {}),
),
TestWidgetsApp(
child: Overlay(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we consider adding Overlay to TestWidgetsApp or do you think that's overkill when it's not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has it's pro and con, for now I have added. I feel its not adding any problems to other tests(currently) + reducing boilerplate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nvm, its complicating TestWidgetApp and tests both. So, keeping both separated.

opacity: 0.5,
child: Padding(
padding: EdgeInsets.all(5.0),
child: ColoredBox(color: Color(0xFF2196F3), child: SizedBox(height: 50)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessary because Opacity is already const.


@override
Widget build(BuildContext context) {
return WidgetsApp(
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. I also noticed that there is a test above that includes an Overlay now. Does this change here help? Or should we add an Overlay here so we don't need to include it in the test?

@rkishan516
Copy link
Contributor Author

Looks good minus a few nits, but I see that there is a leak in text_field_test strangely. @rkishan516 any idea what would trigger that?

I will look at it. There is no change in text_field_test specific file.

@rkishan516 rkishan516 force-pushed the cross-imports-test branch 2 times, most recently from 7ac2a4b to 4feb18e Compare January 17, 2026 07:13
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/// @docImport 'package:flutter/cupertino.dart';
Copy link
Contributor

Choose a reason for hiding this comment

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

@justinmc Are doc imports allowed? When Material and Cupertino are split off, this will cause comment_references warnings.

Apparently that lint is not yet enabled, see https://github.com/flutter/flutter/blob/master/analysis_options.yaml#L95

but once the linked issue is fixed and the lint is enabled, this will be an issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. It looks like there are a couple other similar docImports around flutter_test (example). I say we keep this as-is for now. If we need to migrate it in when we decouple, we can migrate this one too.

I will write this down as something to figure out before decoupling.

Copy link
Contributor

@navaronbracke navaronbracke Jan 20, 2026

Choose a reason for hiding this comment

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

Maybe we should add a sub issue to the umbrella of the cross imports project where we

  1. update the check you wrote for regular dependencies, to handle @docImport prefixes as well
  2. update the items list with the results of checking doc imports
  3. Either clean up doc imports in the same issue as for the regular ones, or split that off (since this is only an issue once the lint is enabled, which could happen post split anyway?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Good call, this is more complicated than I thought. I wrote up an issue: #181288

And I added it as "related" on #177028, though not as a strict subissue.

Widget build(BuildContext context) {
return WidgetsApp(
color: color,
builder: (BuildContext context, Widget? navigatorChild) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@rkishan516 The home parameter should be passed to WidgetsApp.home in the constructor, to match what WidgetsApp does.

I'm also not sure if builder: (BuildContext context, Widget? navigatorChild) {...} is needed for anything specific in tests? Can we remove builder ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, builder is not need in current version. I will update to use WidgetApp.home rather than builder.

github-merge-queue bot pushed a commit that referenced this pull request Jan 18, 2026
…st.dart (#180996)

This PR removes the MaterialButtons and Divider from
test/widgets/draggable_scrollable_sheet_test.dart
I also replaced some usages of WidgetsApp that did not use
`WidgetsApp(home: home)` with MaterialApp.
These usages can be replaced once
#180456 provides
`TestWidgetsApp`.

Part of #177415
Part of #180501

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
calltekk pushed a commit to calltekk/flutter that referenced this pull request Jan 19, 2026
…st.dart (flutter#180996)

This PR removes the MaterialButtons and Divider from
test/widgets/draggable_scrollable_sheet_test.dart
I also replaced some usages of WidgetsApp that did not use
`WidgetsApp(home: home)` with MaterialApp.
These usages can be replaced once
flutter#180456 provides
`TestWidgetsApp`.

Part of flutter#177415
Part of flutter#180501

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

Looks good but I want to be sure about putting this in flutter_test (comment below).

Copy link
Contributor

Choose a reason for hiding this comment

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

I just realized this is in flutter_test. We've been putting utils like this in utils files in test/widgets (example). But I see the advantage here, by putting it in flutter_test you allow our users to use this in their tests too.

@Renzo-Olivares I wonder if you thought about this at all when you wrote TestTextField?

Copy link
Contributor

Choose a reason for hiding this comment

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

I talked to @Renzo-Olivares offline, and this same discussion came up in that PR: https://github.com/flutter/flutter/pull/180494/files#r2677591418

I think I agree with that argument. So this should go in the tests/ directory for now, but we should document it very well (as you have already done) and consider moving it to flutter_test in the future when the API is more proven.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, I will move it to tests/. Should we create a issue for moving these to flutter_test?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea, here you go: #181283

Maybe add it as a TODO next to the declaration of TestWidgetsApp.

// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/// @docImport 'package:flutter/cupertino.dart';
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. It looks like there are a couple other similar docImports around flutter_test (example). I say we keep this as-is for now. If we need to migrate it in when we decouple, we can migrate this one too.

I will write this down as something to figure out before decoupling.

@rkishan516 rkishan516 added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 29, 2026
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

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

Changes reported for pull request #180456 at sha 61885d1

@justinmc
Copy link
Contributor

The goldens were slight color changes, I've approved them.

@auto-submit auto-submit bot added this pull request to the merge queue Jan 29, 2026
Merged via the queue into flutter:master with commit 130808c Jan 29, 2026
150 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 29, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 30, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 30, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 30, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 30, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 30, 2026
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 30, 2026
Roll Flutter from da72d5936d69 to 1d9d6a9a5ef6 (33 revisions)

flutter/flutter@da72d59...1d9d6a9

2026-01-30 [email protected] enable enhanced debugging for GLES playground (flutter/flutter#181157)
2026-01-30 [email protected] Make the Windows windowing_test in .ci.yaml have bringup as false (flutter/flutter#181664)
2026-01-30 [email protected] Roll Packages from cd4fd61 to 510dd40 (4 revisions) (flutter/flutter#181726)
2026-01-30 [email protected] Roll Skia from edbf7e9eb846 to 4745eb2fe837 (1 revision) (flutter/flutter#181725)
2026-01-30 [email protected] Enhance error handling of WidgetsBindingObserver callbacks (flutter/flutter#181174)
2026-01-30 [email protected] Roll Skia from 05d3cb9d2be9 to edbf7e9eb846 (2 revisions) (flutter/flutter#181715)
2026-01-30 [email protected] Roll Skia from c198e5fa9cd9 to 05d3cb9d2be9 (1 revision) (flutter/flutter#181712)
2026-01-30 [email protected] Roll Dart SDK from 920b7e24583e to 2703fd9733ce (2 revisions) (flutter/flutter#181693)
2026-01-30 [email protected] Roll Skia from b9f40c193e7a to c198e5fa9cd9 (6 revisions) (flutter/flutter#181692)
2026-01-30 [email protected] Roll pub packages (flutter/flutter#181690)
2026-01-30 [email protected] Extend the Windows tool_integration_tests_2_9 shard timeout to 1 hour (flutter/flutter#181678)
2026-01-29 [email protected] Add `android_sdk` dependency to `android_engine_opengles_tests` (flutter/flutter#181681)
2026-01-29 [email protected] Roll Dart SDK from a0685c8e946b to 920b7e24583e (3 revisions) (flutter/flutter#181680)
2026-01-29 [email protected] Roll Skia from 128b5213711e to b9f40c193e7a (14 revisions) (flutter/flutter#181675)
2026-01-29 [email protected] [Impeller] Ensure that HostBuffers/DeviceBuffers allocated by RendererTest tests are valid for the lifetime of the RenderPass (flutter/flutter#181635)
2026-01-29 [email protected] [Impeller] Fix off-by-one indices in the SimilarPointPair/SimilarPointTrio functions used by ShadowPathGeometryTest (flutter/flutter#181623)
2026-01-29 [email protected] 180162 fix radio list tile and switch list tile accept widget states controller (flutter/flutter#180367)
2026-01-29 [email protected] Remove unused test file (flutter/flutter#181671)
2026-01-29 [email protected] Roll libpng to version 1.6.54 (flutter/flutter#181625)
2026-01-29 [email protected] Remove nonstandard ndkpath for `hybrid_android_views` integration test (flutter/flutter#181666)
2026-01-29 [email protected] Add TestWidgetsApp utility and refactor widget tests to use WidgetsApp (flutter/flutter#180456)
2026-01-29 [email protected] Add `TestTextField` and migrate tests (flutter/flutter#180494)
2026-01-29 [email protected] Merge changelog for 3.38.9 (flutter/flutter#181668)
2026-01-29 [email protected] [flutter_tools] Deprecate `plugin_ffi` template (flutter/flutter#181588)
2026-01-29 [email protected] Deprecate onReorder callback (flutter/flutter#178242)
2026-01-29 [email protected] [web] Use defensive null check in text editing placeElement (flutter/flutter#180795)
2026-01-29 [email protected] Roll Packages from 1cb2148 to cd4fd61 (4 revisions) (flutter/flutter#181663)
2026-01-29 [email protected] Roll Skia from 89df65f8324c to 128b5213711e (2 revisions) (flutter/flutter#181651)
2026-01-29 [email protected] [hooks] Don't run build hooks for code assets in `flutter run` (flutter/flutter#181542)
2026-01-29 [email protected] Roll Dart SDK from f10dcbfca98f to a0685c8e946b (5 revisions) (flutter/flutter#181653)
2026-01-29 [email protected] Fixes getUniformX for Vulkan (flutter/flutter#181286)
2026-01-29 [email protected] Roll Fuchsia Linux SDK from adhoq9ouVRh0xzkm3... to isy1ARvK-3bsvtfc-... (flutter/flutter#181641)
2026-01-29 [email protected] Add isDark, isLight, and isSystem getters to ThemeMode (flutter/flutter#181475)

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] 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:
...
LongCatIsLooong pushed a commit to LongCatIsLooong/flutter that referenced this pull request Feb 6, 2026
flutter#180456)

This PR introduces a TestWidgetsApp utility class that provides a
minimal WidgetsApp wrapper for widget tests, replacing direct usage of
Directionality widgets.

part of: flutter#177415 

## Changes
- test_widgets_app.dart - A reusable TestWidgetsApp widget that wraps
WidgetsApp with a builder pattern, providing Directionality, MediaQuery,
and other app-level widgets that WidgetsApp provides.
- gesture_detector_test.dart - Replaced 9 Directionality usages
- mouse_region_test.dart - Replaced 13 Directionality usages
- opacity_test.dart - Replaced 2 Directionality usages
- slivers_evil_test.dart - Replaced 3 Directionality usages and removed
redundant MediaQuery wrappers

## Note
- This PR updates golden test baselines for opacity_test.dart.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
flutter-zl pushed a commit to flutter-zl/flutter that referenced this pull request Feb 10, 2026
…st.dart (flutter#180996)

This PR removes the MaterialButtons and Divider from
test/widgets/draggable_scrollable_sheet_test.dart
I also replaced some usages of WidgetsApp that did not use
`WidgetsApp(home: home)` with MaterialApp.
These usages can be replaced once
flutter#180456 provides
`TestWidgetsApp`.

Part of flutter#177415
Part of flutter#180501

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
flutter-zl pushed a commit to flutter-zl/flutter that referenced this pull request Feb 10, 2026
flutter#180456)

This PR introduces a TestWidgetsApp utility class that provides a
minimal WidgetsApp wrapper for widget tests, replacing direct usage of
Directionality widgets.

part of: flutter#177415 

## Changes
- test_widgets_app.dart - A reusable TestWidgetsApp widget that wraps
WidgetsApp with a builder pattern, providing Directionality, MediaQuery,
and other app-level widgets that WidgetsApp provides.
- gesture_detector_test.dart - Replaced 9 Directionality usages
- mouse_region_test.dart - Replaced 13 Directionality usages
- opacity_test.dart - Replaced 2 Directionality usages
- slivers_evil_test.dart - Replaced 3 Directionality usages and removed
redundant MediaQuery wrappers

## Note
- This PR updates golden test baselines for opacity_test.dart.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
rickhohler pushed a commit to rickhohler/flutter that referenced this pull request Feb 19, 2026
flutter#180456)

This PR introduces a TestWidgetsApp utility class that provides a
minimal WidgetsApp wrapper for widget tests, replacing direct usage of
Directionality widgets.

part of: flutter#177415 

## Changes
- test_widgets_app.dart - A reusable TestWidgetsApp widget that wraps
WidgetsApp with a builder pattern, providing Directionality, MediaQuery,
and other app-level widgets that WidgetsApp provides.
- gesture_detector_test.dart - Replaced 9 Directionality usages
- mouse_region_test.dart - Replaced 13 Directionality usages
- opacity_test.dart - Replaced 2 Directionality usages
- slivers_evil_test.dart - Replaced 3 Directionality usages and removed
redundant MediaQuery wrappers

## Note
- This PR updates golden test baselines for opacity_test.dart.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

Development

Successfully merging this pull request may close these issues.

4 participants