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

Skip to content

[Material] Remove Material import from backdrop_filter_test.dart widget tests#181386

Merged
auto-submit[bot] merged 3 commits intoflutter:masterfrom
kazbeksultanov:backdrop-filter-migration
Feb 4, 2026
Merged

[Material] Remove Material import from backdrop_filter_test.dart widget tests#181386
auto-submit[bot] merged 3 commits intoflutter:masterfrom
kazbeksultanov:backdrop-filter-migration

Conversation

@kazbeksultanov
Copy link
Contributor

@kazbeksultanov kazbeksultanov commented Jan 23, 2026

Migrate backdrop_filter_test.dart to use only widget imports following issue #177415. Split the tests into two files:

  • Widgets tests (packages/flutter/test/widgets/backdrop_filter_test.dart):

    • Removed Material import, now uses widgets-only
    • Replaced MaterialApp + Scaffold with Directionality wrapper
    • Replaced Colors.black.withAlpha(40) with Color(0x28000000)
    • Kept 2 tests that validate BackdropFilter key behavior
  • Material tests (packages/flutter/test/material/backdrop_filter_test.dart):

    • Moved 4 Material-specific golden file tests (M2/M3 comparisons)
    • These tests require Material theming to validate rendering differences
  • Updated dev/bots/check_tests_cross_imports.dart to remove backdrop_filter_test.dart

This approach keeps Material-specific tests in the material directory while enabling the simple widget tests to pass without Material dependencies.

Part of: #177415

Pre-launch Checklist

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. 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.

talabat.com Talabat Flutter PRs

…et tests

Migrate backdrop_filter_test.dart to use only widget imports following issue flutter#177415.
Split the tests into two files:

- Widgets tests (packages/flutter/test/widgets/backdrop_filter_test.dart):
  * Removed Material import, now uses widgets-only
  * Replaced MaterialApp + Scaffold with Directionality wrapper
  * Replaced Colors.black.withAlpha(40) with Color(0x28000000)
  * Kept 2 tests that validate BackdropFilter key behavior

- Material tests (packages/flutter/test/material/backdrop_filter_test.dart):
  * Moved 4 Material-specific golden file tests (M2/M3 comparisons)
  * These tests require Material theming to validate rendering differences

- Updated dev/bots/check_tests_cross_imports.dart to remove backdrop_filter_test.dart

This approach keeps Material-specific tests in the material directory while enabling
the simple widget tests to pass without Material dependencies.
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jan 23, 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 refactors backdrop_filter_test.dart to remove its dependency on the Material library. The Material-dependent golden tests are moved to a new file, packages/flutter/test/material/backdrop_filter_test.dart, and the original test file is updated to use Directionality instead of MaterialApp. Additionally, the check_tests_cross_imports.dart script is updated to reflect this change. The changes are well-executed and achieve the goal of better test separation. My review includes a suggestion to reduce code duplication in the new test file to improve maintainability.

Comment on lines +10 to +188
void main() {
testWidgets("Material2 - BackdropFilter's cull rect does not shrink", (
WidgetTester tester,
) async {
await tester.pumpWidget(
MaterialApp(
theme: ThemeData(useMaterial3: false),
home: Scaffold(
body: Stack(
fit: StackFit.expand,
children: <Widget>[
Text('0 0 ' * 10000),
Center(
// ClipRect needed for filtering the 200x200 area instead of the
// whole screen.
child: ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
child: Container(
alignment: Alignment.center,
width: 200.0,
height: 200.0,
child: const Text('Hello World'),
),
),
),
),
],
),
),
),
);
await expectLater(
find.byType(RepaintBoundary).first,
matchesGoldenFile('m2_backdrop_filter_test.cull_rect.png'),
);
});

testWidgets("Material3 - BackdropFilter's cull rect does not shrink", (
WidgetTester tester,
) async {
await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: Stack(
fit: StackFit.expand,
children: <Widget>[
Text('0 0 ' * 10000),
Center(
// ClipRect needed for filtering the 200x200 area instead of the
// whole screen.
child: ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
child: Container(
alignment: Alignment.center,
width: 200.0,
height: 200.0,
child: const Text('Hello World'),
),
),
),
),
],
),
),
),
);
await expectLater(
find.byType(RepaintBoundary).first,
matchesGoldenFile('m3_backdrop_filter_test.cull_rect.png'),
);
});

testWidgets('Material2 - BackdropFilter blendMode on saveLayer', (WidgetTester tester) async {
await tester.pumpWidget(
MaterialApp(
theme: ThemeData(useMaterial3: false),
home: Scaffold(
body: Opacity(
opacity: 0.9,
child: Stack(
fit: StackFit.expand,
children: <Widget>[
Text('0 0 ' * 10000),
Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// ClipRect needed for filtering the 200x200 area instead of the
// whole screen.
children: <Widget>[
ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
child: Container(
alignment: Alignment.center,
width: 200.0,
height: 200.0,
color: Colors.yellow.withAlpha(0x7),
),
),
),
ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
blendMode: BlendMode.src,
child: Container(
alignment: Alignment.center,
width: 200.0,
height: 200.0,
color: Colors.yellow.withAlpha(0x7),
),
),
),
],
),
],
),
),
),
),
);
await expectLater(
find.byType(RepaintBoundary).first,
matchesGoldenFile('m2_backdrop_filter_test.saveLayer.blendMode.png'),
);
});

testWidgets('Material3 - BackdropFilter blendMode on saveLayer', (WidgetTester tester) async {
await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: Opacity(
opacity: 0.9,
child: Stack(
fit: StackFit.expand,
children: <Widget>[
Text('0 0 ' * 10000),
Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// ClipRect needed for filtering the 200x200 area instead of the
// whole screen.
children: <Widget>[
ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
child: Container(
alignment: Alignment.center,
width: 200.0,
height: 200.0,
color: Colors.yellow.withAlpha(0x7),
),
),
),
ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
blendMode: BlendMode.src,
child: Container(
alignment: Alignment.center,
width: 200.0,
height: 200.0,
color: Colors.yellow.withAlpha(0x7),
),
),
),
],
),
],
),
),
),
),
);
await expectLater(
find.byType(RepaintBoundary).first,
matchesGoldenFile('m3_backdrop_filter_test.saveLayer.blendMode.png'),
);
});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's significant code duplication between the Material 2 and Material 3 tests. To improve maintainability and readability, consider refactoring these tests to use a shared helper function that parameterizes the useMaterial3 flag and the golden file name.

For example, the 'cull rect' tests could be refactored like this:

void main() {
  void testCullRect({required bool useMaterial3}) {
    testWidgets("Material${useMaterial3 ? 3 : 2} - BackdropFilter's cull rect does not shrink", (WidgetTester tester) async {
      await tester.pumpWidget(
        MaterialApp(
          theme: useMaterial3 ? null : ThemeData(useMaterial3: false),
          home: Scaffold(
            body: Stack(
              fit: StackFit.expand,
              children: <Widget>[
                Text('0 0 ' * 10000),
                Center(
                  child: ClipRect(
                    child: BackdropFilter(
                      filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
                      child: Container(
                        alignment: Alignment.center,
                        width: 200.0,
                        height: 200.0,
                        child: const Text('Hello World'),
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ),
      );
      await expectLater(
        find.byType(RepaintBoundary).first,
        matchesGoldenFile('m${useMaterial3 ? 3 : 2}_backdrop_filter_test.cull_rect.png'),
      );
    });
  }

  testCullRect(useMaterial3: false);
  testCullRect(useMaterial3: true);

  // ... similar refactoring for blendMode tests
}

This would align with the style guide's principle of optimizing for readability.

References
  1. The style guide advises to 'Optimize for readability' (line 29). Reducing code duplication in tests improves readability and makes them easier to maintain. (link)

Copy link
Contributor

Choose a reason for hiding this comment

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

Or another way we've done this kind of thing.

for (final useMaterial3  in [false, true]) {
  ...
}

I'm ok with either of these 3 approaches though. Duplication in tests doesn't bother me much, though I guess here it's easier to see that the tests are identical except for useMaterial3 when you loop them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly for this case I this it's better to just copy past as it was exactly in a Widget.

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

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 #181386 at sha 7dfda84

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Jan 26, 2026
@kazbeksultanov
Copy link
Contributor Author

@justinmc Can you take a look?

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.

LGTM with a nit (#181386 (comment)).

@kazbeksultanov Can you look at the goldens and confirm that they are identical to the old ones?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree these should be in material 👍

@kazbeksultanov
Copy link
Contributor Author

kazbeksultanov commented Jan 28, 2026

@kazbeksultanov Can you look at the goldens and confirm that they are identical to the old ones?

I run on my local machine goldens while they were in the widgets and then in metrial.
They are 100% identical.

Here the pngs and small comparison md file inside.

backdrop_golden_comparison.zip

@justinmc if there is other way to check, please share.

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.

LGTM 👍 . Thanks for checking the goldens, that satisfies me. The goldens UI (link from the bot's comment above) is usually the best way to check, but in this case the files have moved, so it doesn't show a side by side comparison like it usually does.

@AbdeMohlbi AbdeMohlbi self-requested a review February 3, 2026 19:19
Copy link
Contributor

@AbdeMohlbi AbdeMohlbi left a comment

Choose a reason for hiding this comment

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

SGTM

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 3, 2026
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 3, 2026
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 3, 2026

autosubmit label was removed for flutter/flutter/181386, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@kazbeksultanov
Copy link
Contributor Author

@ksokolovskyi or @AbdeMohlbi can you put it autosubmit please 🙏 ?

@kazbeksultanov
Copy link
Contributor Author

@Piinks one more time autosubit please 🙏

@AbdeMohlbi AbdeMohlbi added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 4, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Feb 4, 2026
Merged via the queue into flutter:master with commit 9d58e06 Feb 4, 2026
151 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 4, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 4, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 4, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 5, 2026
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 5, 2026
Roll Flutter from bf701fefec86 to f916dd6887bf (44 revisions)

flutter/flutter@bf701fe...f916dd6

2026-02-05 [email protected] Implement macOS wide gamut (Display P3) support (flutter/flutter#181769)
2026-02-04 [email protected] Roll Skia from d23ecfbfdff9 to 8543ce512d5c (3 revisions) (flutter/flutter#181923)
2026-02-04 [email protected] Roll Dart SDK from 8001c99d952b to 8f778ffd318b (3 revisions) (flutter/flutter#181927)
2026-02-04 [email protected] Re-enable AddressSanitizer on the linux_unopt builder (flutter/flutter#181741)
2026-02-04 [email protected] Add exception to log message in ContentSizingFlag.java (flutter/flutter#181813)
2026-02-04 [email protected] Roll pub packages (flutter/flutter#181925)
2026-02-04 [email protected] [flutter_tools] Deprecate web hot reload flag (flutter/flutter#181884)
2026-02-04 [email protected] Marks platform_views_scroll_perf_impeller__timeline_summary unflaky (flutter/flutter#181649)
2026-02-04 [email protected] Roll Dart SDK from 204db085d970 to 8001c99d952b (1 revision) (flutter/flutter#181902)
2026-02-04 [email protected] Roll Skia from f37a22506eb4 to d23ecfbfdff9 (23 revisions) (flutter/flutter#181915)
2026-02-04 [email protected] In the Web codec tests, skip an undecodable image that is used to test a Skia error handling code path. (flutter/flutter#181870)
2026-02-04 [email protected] Roll Packages from 5b1bea8 to 3bddf2c (5 revisions) (flutter/flutter#181918)
2026-02-04 [email protected] Roll Fuchsia Linux SDK from UmQaaNuhkiuE8Dzug... to J2QdLcY2gyt4NP_xV... (flutter/flutter#181893)
2026-02-04 [email protected] Roll Dart SDK from 54322a0b1109 to 204db085d970 (3 revisions) (flutter/flutter#181890)
2026-02-04 [email protected] Cleanup cross imports (flutter/flutter#181807)
2026-02-04 [email protected] [Material] Remove Material import from backdrop_filter_test.dart widget tests (flutter/flutter#181386)
2026-02-04 [email protected] Move CheckedModeBanner tests to material and remove Material import from widgets banner_test (flutter/flutter#181261)
2026-02-04 [email protected] feat: Pass parameters from DropdownMenuFormField to DropDownMenu (flutter/flutter#181373)
2026-02-04 [email protected] Remove `Config complete` log when using `flutter build apk --config-only` (flutter/flutter#181864)
2026-02-04 [email protected] [Impeller] Fix flattening of very large zoomed curves with tiny stroke widths (flutter/flutter#181505)
2026-02-03 [email protected] Propagates Overlay's MediaQueryData to OverlayPortal child (flutter/flutter#181579)
2026-02-03 [email protected] Make sure that an AnimatedScale doesn't crash in 0x0 environment (flutter/flutter#181481)
2026-02-03 [email protected] Roll Dart SDK from 56294a92d5cc to 54322a0b1109 (1 revision) (flutter/flutter#181872)
2026-02-03 [email protected] Fix decorated box (flutter/flutter#179802)
2026-02-03 [email protected] Roll pub packages (flutter/flutter#181871)
2026-02-03 [email protected] Remove Material library dependency from expansible_test.dart (flutter/flutter#181657)
2026-02-03 [email protected] Organize and update fragment shader uniform tests. (flutter/flutter#181822)
2026-02-03 [email protected] fix(web_ui): handle non-invertible matrices in ImageFilter.matrix (flutter/flutter#181742)
2026-02-03 [email protected] Remove unnecessary Material import from cupertino/slider_test.dart (flutter/flutter#180957)
2026-02-03 [email protected] Remove the Flutter.xcframework as a swift dependency (flutter/flutter#181739)
2026-02-03 [email protected] feature: implementation of tooltips in the `_TestWindowingOwner` and minor bugfixes to the multiple windows example app (flutter/flutter#181510)
2026-02-03 [email protected] [Web] Fix flt-platform-view comment (flutter/flutter#181576)
2026-02-03 [email protected] Marks Linux_pixel_7pro android_verified_input_test to be unflaky (flutter/flutter#179120)
2026-02-03 [email protected] Unmark `hybrid_android_views_integration_test` as bringup (flutter/flutter#181628)
2026-02-03 [email protected] Remove material from sliver_tree_test.dart (flutter/flutter#181415)
2026-02-03 [email protected] Make `android_plugin_new_output_dir_test` only build release (flutter/flutter#181677)
2026-02-03 [email protected] Roll customer tests (flutter/flutter#181825)
2026-02-03 [email protected] Add Linux Foundation Health Score badge to README (flutter/flutter#175587)
2026-02-03 [email protected] Remove unused getters on AndroidProject class (flutter/flutter#181860)
2026-02-03 [email protected] Adds batch release doc for flutter/package (flutter/flutter#181676)
2026-02-03 [email protected] [ Tool ] Don't use `globals.platform` in `getFlutterRoot()` (flutter/flutter#181859)
2026-02-03 [email protected] Roll Packages from 837dbbd to 5b1bea8 (10 revisions) (flutter/flutter#181857)
2026-02-03 [email protected] Remove material from basic_test.dart (flutter/flutter#181444)
2026-02-03 [email protected] [ Tool ] Fix regression introduced in flutter/flutter#181421 (flutter/flutter#181826)

If this roll has caused a breakage, revert this CL and stop the roller
...
LongCatIsLooong pushed a commit to LongCatIsLooong/flutter that referenced this pull request Feb 6, 2026
…et tests (flutter#181386)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

Migrate backdrop_filter_test.dart to use only widget imports following
issue flutter#177415. Split the tests into two files:

- Widgets tests
(packages/flutter/test/widgets/backdrop_filter_test.dart):
  * Removed Material import, now uses widgets-only
  * Replaced MaterialApp + Scaffold with Directionality wrapper
  * Replaced Colors.black.withAlpha(40) with Color(0x28000000)
  * Kept 2 tests that validate BackdropFilter key behavior

- Material tests
(packages/flutter/test/material/backdrop_filter_test.dart):
  * Moved 4 Material-specific golden file tests (M2/M3 comparisons)
* These tests require Material theming to validate rendering differences

- Updated dev/bots/check_tests_cross_imports.dart to remove
backdrop_filter_test.dart

This approach keeps Material-specific tests in the material directory
while enabling the simple widget tests to pass without Material
dependencies.

Part of:  flutter#177415

## 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


[![talabat.com](https://img.shields.io/badge/talabat.com-contributions-FF5A00?style=flat&logo=flutter&logoColor=white)](https://www.talabat.com)
[![Talabat Flutter
PRs](https://img.shields.io/badge/Talabat_Flutter_PRs-10%20merged-97ca00?style=flat&logo=flutter&logoColor=white)](https://github.com/search?q=org%3Aflutter+talabat&type=pullrequests)

---------

Co-authored-by: Mohellebi Abdessalem <[email protected]>
flutter-zl pushed a commit to flutter-zl/flutter that referenced this pull request Feb 10, 2026
…et tests (flutter#181386)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

Migrate backdrop_filter_test.dart to use only widget imports following
issue flutter#177415. Split the tests into two files:

- Widgets tests
(packages/flutter/test/widgets/backdrop_filter_test.dart):
  * Removed Material import, now uses widgets-only
  * Replaced MaterialApp + Scaffold with Directionality wrapper
  * Replaced Colors.black.withAlpha(40) with Color(0x28000000)
  * Kept 2 tests that validate BackdropFilter key behavior

- Material tests
(packages/flutter/test/material/backdrop_filter_test.dart):
  * Moved 4 Material-specific golden file tests (M2/M3 comparisons)
* These tests require Material theming to validate rendering differences

- Updated dev/bots/check_tests_cross_imports.dart to remove
backdrop_filter_test.dart

This approach keeps Material-specific tests in the material directory
while enabling the simple widget tests to pass without Material
dependencies.

Part of:  flutter#177415

## 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


[![talabat.com](https://img.shields.io/badge/talabat.com-contributions-FF5A00?style=flat&logo=flutter&logoColor=white)](https://www.talabat.com)
[![Talabat Flutter
PRs](https://img.shields.io/badge/Talabat_Flutter_PRs-10%20merged-97ca00?style=flat&logo=flutter&logoColor=white)](https://github.com/search?q=org%3Aflutter+talabat&type=pullrequests)

---------

Co-authored-by: Mohellebi Abdessalem <[email protected]>
rickhohler pushed a commit to rickhohler/flutter that referenced this pull request Feb 19, 2026
…et tests (flutter#181386)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

Migrate backdrop_filter_test.dart to use only widget imports following
issue flutter#177415. Split the tests into two files:

- Widgets tests
(packages/flutter/test/widgets/backdrop_filter_test.dart):
  * Removed Material import, now uses widgets-only
  * Replaced MaterialApp + Scaffold with Directionality wrapper
  * Replaced Colors.black.withAlpha(40) with Color(0x28000000)
  * Kept 2 tests that validate BackdropFilter key behavior

- Material tests
(packages/flutter/test/material/backdrop_filter_test.dart):
  * Moved 4 Material-specific golden file tests (M2/M3 comparisons)
* These tests require Material theming to validate rendering differences

- Updated dev/bots/check_tests_cross_imports.dart to remove
backdrop_filter_test.dart

This approach keeps Material-specific tests in the material directory
while enabling the simple widget tests to pass without Material
dependencies.

Part of:  flutter#177415

## 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


[![talabat.com](https://img.shields.io/badge/talabat.com-contributions-FF5A00?style=flat&logo=flutter&logoColor=white)](https://www.talabat.com)
[![Talabat Flutter
PRs](https://img.shields.io/badge/Talabat_Flutter_PRs-10%20merged-97ca00?style=flat&logo=flutter&logoColor=white)](https://github.com/search?q=org%3Aflutter+talabat&type=pullrequests)

---------

Co-authored-by: Mohellebi Abdessalem <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants