26528 Commits

Author SHA1 Message Date
Reid Baker
935b8f7030
Migrate abi build paths to use new abi filtering api #AGP9 (#181828)
Related to #180137 

Not equivalent migrations, Before [1]* release/debug `BuildType`'s were
modified to clear the set abi values and force set the 3 abi values
flutter supports. The proposed code allows overriding of the abi config
in defaultConfig without a flag but *requires* `-P
disable-abi-filtering=true` to set custom values in either BuildTypes or
Flavors.
Flavors requiring a flag is consistent behavior with no change. This is
because the "newDsl" only allows a union of default and other build
types AGP bug tracking this can be found here
http://issuetracker.google.com/issues/285353854.

[1] if --split-abi flag was not passed and the app did not disable abi
filter in their build props

`onVariants` is not preferred because
[variant](https://android.googlesource.com/platform/tools/base/+/refs/heads/mirror-goog-studio-main/build-system/gradle-api/src/main/java/com/android/build/api/variant/Variant.kt)
does not contain the values we wish to set. Specifically any abi/ndk
values. The "buildType" on variant is a string which is not the same as
`BaseExtension.buildTypes`.
`variantBuilder` similarly did not have the values we want to modify.
[VariantBuilder
Source](https://android.googlesource.com/platform/tools/base/+/refs/heads/mirror-goog-studio-main/build-system/gradle-api/src/main/java/com/android/build/api/variant/VariantBuilder.kt).

Command to run a specific jni integration tests from
`packages/flutter_tools/` `FLUTTER_ROOT=~/flutter-work/
../../bin/cache/dart-sdk/bin/dart test
test/integration.shard/gradle_jni_packaging_test.dart --plain-name
'abiFilters provided by the user take precedence over the default'`


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

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
Co-authored-by: jesswrd <jessiewong401@gmail.com>
2026-02-19 16:38:23 +00:00
Mouad Debbar
9af4145b8e
[web] Flutter errors should be reported with console.error() (#178886)
Fixes https://github.com/flutter/flutter/issues/178340
2026-02-19 16:38:23 +00:00
Hameed Habeeblahi Gbolahan
d33442bedb
Refactor autofill_group_test.dart to remove Material dependencies (#181903)
## Summary
Refactored `autofill_group_test.dart` to remove Material dependencies.
`AutofillGroup` is a widgets feature, so this test should use
widgets-only patterns:
- Replace `MaterialApp` + `Scaffold` with `TestWidgetsApp`
- Update import from `material.dart` to `widgets.dart`
Part of #177414
## 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.
- [ ] 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].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
<!-- 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
2026-02-19 16:35:00 +00:00
Kishan Rathore
1fdf684e32
Remove material from Modal barrier tests (#181708)
This PR removes Material imports from modal_barrier_test.dart.

part of: https://github.com/flutter/flutter/issues/177415
depends on: https://github.com/flutter/flutter/pull/181695

## 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.
2026-02-19 02:58:31 +00:00
Kishan Rathore
8a80222e4d
Remove material from ticker mode test (#181696)
This PR removes Material imports from ticker_mode_test.dart.

part of: https://github.com/flutter/flutter/issues/177415
depends on: https://github.com/flutter/flutter/pull/181695

## 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.
2026-02-19 02:50:38 +00:00
Kishan Rathore
de1b130cf6
Remove material imports from Inherited Model, Magnifier, SafeArea, UndoHistory, Navigator and Layers test (#181709)
This PR removes Material imports from below given files

* inherited_model_test.dart
* magnifier_test.dart
* safe_area_test.dart
* undo_history_test.dart
* navigator_and_layers_test.dart

part of: https://github.com/flutter/flutter/issues/177415
depends on: https://github.com/flutter/flutter/pull/181695

## 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.
2026-02-19 00:54:38 +00:00
Akshat.Shukla
e1f11bd5aa
docs: fix grammar in animation library documentation (#182461)
## Description

Fixes minor grammatical and punctuation issues in the animation library
documentation (`packages/flutter/lib/animation.dart`).

These changes improve readability and clarity of the documentation
without affecting functionality.

## Type of change
- Documentation improvement (no code behavior changes)

## Tests
Not required — documentation only change.
2026-02-19 00:44:19 +00:00
Ahmed Mohamed Sameh
76f70d21da
Handle#6537 first grouped tests (#182077)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the following
widgets:
AnimatedOpacity
AnimatedDefaultTextStyle
AnimatedPhysicalModel
AnimatedFractionallySizedBox
InteractiveViewer
LayoutBuilder
ListWheelScrollView
ListWheelViewport
Localizations
RawMagnifier
ModalBarrier

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2026-02-19 00:40:54 +00:00
Hameed Habeeblahi Gbolahan
1f506886e1
Move SelectionArea web test from widgets to material folder (#181951)
PR Body:
- Move the web-specific SelectionArea mouse cursor regression test from
`html_element_view_test.dart` to `selection_area_test.dart`
- This places the web test alongside its non-web counterpart (which has
`skip: kIsWeb`)
- Remove Material dependency from `html_element_view_test.dart` (now
uses `package:flutter/widgets.dart`)
- Remove `html_element_view_test.dart` from `knownWidgetsCrossImports`
list
                                                    
## 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

---------

Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
2026-02-19 00:36:13 +00:00
Elijah Okoroh
2c24f0f312
Update create template to always generate both SwiftPM and CocoaPods support for iOS/macOS plugins (#181251)
This PR updates the flutter create command so that all newly created iOS
and macOS plugins include both Swift Package Manager (SwiftPM) and
CocoaPods support, regardless of whether the SwiftPM feature flag is
enabled.

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

Fixes #180926

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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
2026-02-19 00:15:27 +00:00
Akhil George
e0e7a7d72d
Fix(Material): DateRangePicker ignores DatePickerTheme.dayShape (#181658)
<!--
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
-->

This change fixes a problem where `showDateRangePicker` ignored the
`dayShape` property in `DatePickerThemeData`, leading to days always
rendering as circles regardless of the theme. This was caused by the
internal `_DayItem` widget using a hardcoded `BoxDecoration` regardless
of the theme configuration.

Fixes #181500

| Before | After |
| :---: | :---: |
| <img
src="https://github.com/user-attachments/assets/56a7c33e-ce91-4c30-8e62-ac0bceb1e3d3"
width="350"> | <img
src="https://github.com/user-attachments/assets/431c8ad2-0825-400a-8dd3-b264ec7430ce"
width="350"> |

## 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.
- [ ] 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].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2026-02-18 23:00:57 +00:00
Noaman Monther
96d292fa0a
Fixing ExpansionTile expandedAlignment not Accepts AlignmentGeometry … (#180814)
<!--
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
-->

*the expandedAlignment defined as Alignment , not as AlignmentGeometry
even if _buildBody returns Align widget which accepts alignment property
as AlignmentGeometry.*

#180813

## I have included 2 tests in the [flutter/tests] :
1- ExpansionTile expandedAlignment with directional test
2-ExpansionTile expandedCrossAxisAlignment with directional
expandedAlignment test

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

---------

Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2026-02-18 22:43:20 +00:00
Victoria Ashworth
246b62f221
Give guided error message when CocoaPod and SwiftPM dependency conflicts (#182392)
Gives a guided message when a CocoaPod plugin has a pod-level dependency
on a plugin that supports SwiftPM.

Fixes https://github.com/flutter/flutter/issues/181303

## 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
2026-02-18 22:41:08 +00:00
Navaron Bracke
1e97fd38cf
Remove material from interactive_viewer_test.dart (#181465)
This PR removes the Material import from interactive_viewer_test.dart

Part of https://github.com/flutter/flutter/issues/177415

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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
2026-02-18 20:49:17 +00:00
zhongliugo
c023e5b247
[web] Pass form validation errors to screen readers via aria-description (#180556)
Fixes part of #180496

## Summary
Pass form validation errors to screen readers via `aria-description` on
text fields.

**Before:** 
https://flutter-demo-04-before.web.app/

**After:** 
https://flutter-demo-04-after.web.app/

## Limitations & Future Work

This handles **string-based errors** (`errorText`). For more complex
cases(brought in
https://github.com/flutter/flutter/issues/180496#issuecomment-3713178684),
a follow-up implementation using `aria-describedby` with element IDs is
tracked in #180496:

- Custom error widgets (`InputDecoration.error`)
- Errors outside `InputDecoration`
- Custom announcement ordering

The `aria-description` approach (current) and `aria-describedby`
approach (future) can coexist per ARIA specifications.

## Related
- Related discussion: #169157 comments
2026-02-18 18:37:16 +00:00
Nour
1887f3f8e0
flutter_tools: Copy vendored frameworks from plugin podspecs in ios/macos-framework builds (#180135)
Fixes #125530

When running `flutter build ios-framework` or `flutter build
macos-framework`, vendored frameworks declared in plugin podspecs (via
`s.vendored_frameworks`) were not being copied to the output directory.

This PR adds support for parsing plugin podspecs to find
vendored_frameworks entries and copying them to the output directory.
Single .framework files are wrapped into xcframeworks to match the
output format.

Changes:
- Added `copyVendoredFrameworks` method to `BuildFrameworkCommand` base
class
- Added `parseVendoredFrameworks` function to parse podspec Ruby files
- Called from both iOS and macOS framework build commands
- Added unit tests for the podspec parser

I'm happy to adjust the approach if there's a better way to handle this
- particularly around the regex-based podspec parsing. Let me know if
this looks reasonable or if you'd prefer a different strategy.

---------

Co-authored-by: Victoria Ashworth <15619084+vashworth@users.noreply.github.com>
2026-02-18 16:41:11 +00:00
Navaron Bracke
5e7b2a0bb3
Allow TabBar to receive a TabBarScrollController (#180389)
This pull request makes `TabBarScrollController` public, and allows a
`TabBar` widget to receive one.

Fixes https://github.com/flutter/flutter/issues/123965
Fixes https://github.com/flutter/flutter/issues/124608
Related to https://github.com/flutter/flutter/pull/180120

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

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

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
2026-02-18 15:34:23 +00:00
Navaron Bracke
64866862f6
Clean up cross imports in single_child_scroll_view_test.dart, decorated_sliver_test.dart, draggable_scrollable_sheet_test.dart (#181613)
This PR cleans up cross imports in 

- single_child_scroll_view_test.dart
- decorated_sliver_test.dart
- draggable_scrollable_sheet_test.dart

Part of [#177415](https://github.com/flutter/flutter/issues/177415)

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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
2026-02-18 12:18:20 +00:00
Konstantin Scheglov
294aa14e76
Analyzer, require 10.1.0, fix deprecations in dependency_graph.dart (#182507)
<!--
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
-->

In analyzer 10.x.y we deprecated `returnType` and want clients to switch
to `typeName`, to support primary constructors language feature.

## Pre-launch Checklist

- [x] 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].
- [x] 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.

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
2026-02-18 00:30:17 +00:00
Kishan Rathore
ec11254157
Refactor: Remove material from actions test (#181702)
Refactor: Remove material from actions test

part of: https://github.com/flutter/flutter/issues/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.
2026-02-17 23:50:10 +00:00
Hannah Jin
f5825a22a4
[a11y] RangeSlider mouse interaction should change keyboard focus (#182185)
fix: https://github.com/flutter/flutter/issues/173575 

RangeSlider manages its own focus node for 2 thumbs. ( a special case
because it's one widget, one render object but two focus nodes)

so when you dragging a thumb, or tap a thumb, the focus node should
request focus.





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

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
2026-02-17 20:41:38 +00:00
Mohellebi Abdessalem
a58324d980
Remove more getters from userMessages class (#182166)
Towards #125155
This change refactors out more getters form `userMessages` into the
appropriate places.

## 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].
- [ ] 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].
- [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
2026-02-17 20:40:29 +00:00
Victor Sanni
7ac16a2763
Do not wait until dispose before removing replaced/popped page (#182315)
Regression was introduced in [Cleans up navigator pop and remove
logic](https://github.com/flutter/flutter/pull/175612/changes#top).

That PR moved the `onDidRemovePage` call to `_flushHistoryUpdates` in
phase `_RouteLifecycle.dispose`. But waiting until `dispose` causes
potential problems if the widget is rebuilt in a phase preceding that
(but after `pop` or `pushReplacement` has been called). So the outdated
page remains in the pages list even after it has been marked for
removal.

This is causing the page to be pushed again before it is finally
removed, causing the flicker.

## Before


https://github.com/user-attachments/assets/73dba22d-e668-4b2d-84f3-a0beb1faebab



## After


https://github.com/user-attachments/assets/6c8c6ffc-87f0-494f-bd41-7fde1f21d0e1



Fixes [[Navigation] Popping a nested route while the parent is
rebuilding causes a
flicker](https://github.com/flutter/flutter/issues/178570)
2026-02-17 20:23:52 +00:00
Илия
70870ee8d3
Add contentTextStyle support to SimpleDialog (#178824)
## Description

This PR adds `contentTextStyle` support to `SimpleDialog`, matching the
functionality already available in `AlertDialog`.

### Problem

`SimpleDialog` was ignoring `DialogTheme.contentTextStyle`, even though
the `DialogThemeData.contentTextStyle` documentation explicitly states
it applies to `SimpleDialog.children`:

> "Overrides the default value for DefaultTextStyle for
SimpleDialog.children and AlertDialog.content."

However, only `AlertDialog` actually implemented this behavior, forcing
developers to specify text styles individually on each child widget.

### Solution

Added `contentTextStyle` parameter to `SimpleDialog` and applied it
using `DefaultTextStyle`, following the same pattern as `AlertDialog`.
The implementation uses the standard fallback chain:

`contentTextStyle` parameter → `DialogTheme.contentTextStyle` → M2/M3
defaults

### Testing

Added a new test `'SimpleDialog Custom Content Text Style'` that
verifies `contentTextStyle` is correctly applied to the children of
`SimpleDialog`.

## Related Issues

Fixes https://github.com/flutter/flutter/issues/59462

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

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

---------

Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2026-02-17 20:20:21 +00:00
Alex Medinsh
ecf688eb21
Filter error messages from emulator -list-avds output (#180802)
Adds a simple heuristic to filter out the info and error messages that
`emulator -list-avds` can output sometimes. The heuristic assumes that
emulator names can only contain `a-z0-9_.-` in their names.

Fixes https://github.com/flutter/flutter/issues/146125

## 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.
2026-02-17 19:53:08 +00:00
Navaron Bracke
5b1c84cec1
[Reland] Cupertino cross imports (#182416)
This is a reland of https://github.com/flutter/flutter/pull/181634 which
broke the tree, because https://github.com/flutter/flutter/pull/182395
also landed and probably conflicted with it.

Part of https://github.com/flutter/flutter/issues/177415

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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
2026-02-17 19:35:11 +00:00
Kishan Rathore
1f72d29b4c
feat: add routes support in TestWidgetsApp (#181695)
Feat: Add routes and transitionBuilder support in TestWidgetsApp

part of: https://github.com/flutter/flutter/issues/177415

As many test might need navigation with routes, we need to expose route
from WidgetApp to TestWidgetsApp.

## 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.
2026-02-16 17:17:07 +00:00
Koji Wakamiya
8798c51998
[Web] Fix IME and selection by syncing more text styles (#180436)
fix https://github.com/flutter/flutter/issues/161592

The current implementation does not fully reflect
[letter-spacing](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/letter-spacing),
[word-spacing](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/word-spacing),
and
[line-height](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/line-height)
in the DOM. 0bc99f8c4f70973a1877c88ca35804e9bc5fabcf
And the current implementation generates an DomHTMLTextAreaElement every
time the `enabled`. Therefore, it reapplies the
[scrollTop](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop)
value that the Element had been holding internally.
726491298d2b1f17681cab421c7c9276dde19ee6


https://github.com/user-attachments/assets/6f575366-12a0-4246-b2ab-eb2a0e85cfa5


https://github.com/user-attachments/assets/ec660d4c-5166-450c-be38-77b90fcfce76

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MainApp());

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(home: MainPage());
  }
}

class MainPage extends StatelessWidget {
  const MainPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Selection position')),
      body: SingleChildScrollView(
        padding: const .all(16),
        child: Column(
          children: [
            const Text('height=null'),
            TextField(maxLines: 5, style: TextStyle(height: null)),
            const Text('height=1.0'),
            TextField(maxLines: 5, style: TextStyle(height: 1.0)),
            const Text('height=2.0'),
            TextField(maxLines: 5, style: TextStyle(height: 2.0)),
          ],
        ),
      ),
    );
  }
}
```

## 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
2026-02-14 03:30:25 +00:00
auto-submit[bot]
ab86f66e94
Reverts "Standardize on Test* widgets in *_tester.dart files (#182395)" (#182406)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#182395
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: gaaclarke
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: this is causing breakages on the dashboard

example:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8689933991528003217/+/u/run_test.dart_for_framework_tests_shard_and_subshard_libraries/stdout

```
10:36 +9458 ~24: /b/s/w/ir/x/w/flutter/packages/flutter/test/material/dialog_test.dart: Dialog children padding is correct AlertDialog padding is correct when only icon, title a
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: justinmc
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {Renzo-Olivares, victorsanni, navaronbracke}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
This PR moves:

 * TestTextField from editable_text_utils.dart to editable_text_tester.dart
 * TestListTile from list_tile_test_utils.dart to list_tile_tester.dart
 * TestButton from utils.dart to button_tester.dart
 
The purpose is to align with other Test* widgets, such as TestWidgetsApp in [widgets_app_tester.dart](https://github.com/flutter/flutter/blob/master/packages/flutter/test/widgets/widgets_app_tester.dart) and TestSemantics in [semantics_tester.dart](https://github.com/flutter/flutter/blob/master/packages/flutter/test/widgets/semantics_tester.dart).

We should continue to follow this pattern in the future, such as in https://github.com/flutter/flutter/pull/181722.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2026-02-14 01:46:47 +00:00
auto-submit[bot]
1a1ddb0f16
Reverts "Fix cross imports for all Cupertino tests (#181634)" (#182404)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#181634
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: chunhtai
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: tree breakage
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: navaronbracke
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {justinmc}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
This PR fixes all of the Cupertino cross imports, except for the one
that uses `SelectableText`, which needs further discussion.

Some Material specific tests for Cupertino are now under
`tests/material/cupertino`.

Part of https://github.com/flutter/flutter/issues/177415

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

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

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2026-02-14 00:28:48 +00:00
Victor Sanni
d3a07677ec
Add await to tester.pump callsites (#182398)
Surprised we missed this when reviewing the 0x0 PRs. cc @ahmedsameha1
2026-02-13 23:55:28 +00:00
Jaime Wren
ac3aa6dad6
refactor: Centralize table formatting logic into a new formatTable utility function. (#182196)
This resolves https://github.com/flutter/flutter/issues/180949

This is follow-up on https://github.com/flutter/flutter/pull/180098
2026-02-13 23:19:59 +00:00
Justin McCandless
cf4291157b
Standardize on Test* widgets in *_tester.dart files (#182395)
This PR moves:

* TestTextField from editable_text_utils.dart to
editable_text_tester.dart
 * TestListTile from list_tile_test_utils.dart to list_tile_tester.dart
 * TestButton from utils.dart to button_tester.dart
 
The purpose is to align with other Test* widgets, such as TestWidgetsApp
in
[widgets_app_tester.dart](https://github.com/flutter/flutter/blob/master/packages/flutter/test/widgets/widgets_app_tester.dart)
and TestSemantics in
[semantics_tester.dart](https://github.com/flutter/flutter/blob/master/packages/flutter/test/widgets/semantics_tester.dart).
2026-02-13 22:59:39 +00:00
Hameed Habeeblahi Gbolahan
8d238ab04d
Remove Material dependency from transformed_scrollable_test.dart (#182141)
Replace `MaterialApp` with `TestWidgetsApp` and
`Colors.blue`/`Colors.red` with named constants to remove the Material
library dependency.
Part of #177414
## 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

Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
2026-02-13 21:57:34 +00:00
Navaron Bracke
ba46c74971
Fix cross imports for all Cupertino tests (#181634)
This PR fixes all of the Cupertino cross imports, except for the one
that uses `SelectableText`, which needs further discussion.

Some Material specific tests for Cupertino are now under
`tests/material/cupertino`.

Part of https://github.com/flutter/flutter/issues/177415

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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
2026-02-13 21:46:48 +00:00
Ilyosbek Ibrokhimov
da086ba743
remove MaterialApp import from raw_radio_test.dart (#181721)
<!--
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
-->

The RawRadio widget and its associated tests are part of the Widgets
layer, not the Material layer. By replacing the broad material.dart
import with specific imports (foundation.dart, semantics.dart, and
widgets.dart), we ensure better architectural layering and prevent the
Widgets layer from accidentally depending on Material components.

This is a non-breaking change that purely cleans up imports in a test
file.

Issues Fixed
Part of https://github.com/flutter/flutter/issues/177028

## 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
2026-02-13 21:41:21 +00:00
Hameed Habeeblahi Gbolahan
ba9a650bef
Remove Material dependency from semantics_keep_alive_offstage_test.dart (#182211)
Remove Material dependency from semantics_keep_alive_offstage_test.dart
Replace `MaterialApp`/`Scaffold` with `TestWidgetsApp` and
`Colors.red`/`Colors.blue` with simple color constants.
Part of #177414
## 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
2026-02-13 19:35:53 +00:00
Victoria Ashworth
8fdd708068
Update iOS/macOS plugin template to add dependency on FlutterFramework (#181416)
Add the "FlutterFramework" swift package as a dependency to the iOS and
macOS create template.

## 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].
- [ ] 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
2026-02-13 19:25:19 +00:00
Victoria Ashworth
d2d3dd394c
Add plugin dependencies to Add to App FlutterPluginRegistrant (#182304)
This PR copies Flutter plugins that support SwiftPM into the
FlutterPluginRegistrant directory and adds them as dependencies in the
FlutterPluginRegistrant Package.swift. It also parses the
[SupportedPlatform](https://developer.apple.com/documentation/packagedescription/supportedplatform)
out of the Package.swift for each plugin and finds the highest one. It
then makes that value the SupportedPlatform for the
FlutterPluginRegistrant.

Fixes https://github.com/flutter/flutter/issues/181207.

## 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
2026-02-13 19:25:19 +00:00
Lau Ching Jun
592b1caf35
Preparation to add contentTextStyle flag to SimpleDialog. (#182200)
This commit adds a `contentTextStyle` flag to `SimpleDialog` to make it
easier to land the internal fixes needed to PR #178824.

The flag currently does nothing. Actual implementation will be landed in
PR #178824.
2026-02-13 19:17:09 +00:00
EricApostal
f8a1b34d60
Don't throw an exception if no web define variable is set (#182273)
<!--
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
-->

This PR fixes a problem introduced in
https://github.com/flutter/flutter/pull/175805 that caused a build to
exception to be thrown if variables like `{{this}}` were defined in the
web `index.html`, but were not explicitly set by
`--web-define=this=VALUE`.

Resolves https://github.com/flutter/flutter/issues/182243 

Note: As per https://github.com/flutter/flutter/issues/182076, this will
always show the warning if ran with `flutter build web`, whereas
`flutter run -d ...` works fine, regardless of whether you've set the
variable or not. That is set to be fixed in
https://github.com/flutter/flutter/pull/182079, and does not have to do
with this PR.

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

---------

Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
2026-02-13 03:16:37 +00:00
Jason Simmons
e1a890d577
[ Tool ] Allow creation of projects inside the engine's examples directory (#182268)
engine/src/flutter/examples contains sample code for the engine embedder
library. The examples include scripts that create and build Flutter
projects that are run through the embedder.
2026-02-12 23:10:23 +00:00
zhongliugo
7bafe12c4f
[web] Fix scroll event bubbling in iframes (#179703)
Fixes scroll event bubbling when Flutter web is embedded in an
iframe(#156985).

When a scrollable handles a wheel event, it now calls
respond(allowPlatformDefault: false) to signal the engine.

In iframe mode, the engine always calls preventDefault() to block native
scroll chaining, then uses postMessage to explicitly scroll the parent
page only when all scrollables are at boundary

Before change:
https://issue-156985-before.web.app/

After change:
https://issue-156985-after.web.app/
2026-02-12 21:25:13 +00:00
Michał Kucharski
6f1d81b243
Fix flutter build web ignoring --web-define flag (#182079)
## Summary

`flutter build web --web-define=KEY=VALUE` silently ignored the
`--web-define` flag. The option was registered via
`usesWebDefineOption()` but the values were never extracted or passed
through the build pipeline. `flutter run` was unaffected as it correctly
calls `extractWebDefines()`.

This PR threads web-define values through the full `flutter build web`
chain:

- **`build_web.dart`**: Call `extractWebDefines()` and pass the result
to `buildWeb()`.
- **`compile.dart`**: Add `kWebDefinePrefix` constant and `webDefines`
parameter to `buildWeb()`, storing prefixed entries in
`Environment.defines`.
- **`web.dart`**: In `WebTemplatedFiles.build()`, extract web-define
entries from the environment and pass them to both `withSubstitutions()`
calls (bootstrap + index.html).

Related to #175805. 
Fixes #182076

## Test plan

- Added 2 tests in `build_web_test.dart`:
- Verifies `--web-define` values are passed to `Environment.defines`
with `webDefine:` prefix.
- Verifies builds succeed without `--web-define` and no prefixed entries
are present.
- Added 3 tests in `web_test.dart`:
- `WebTemplatedFiles` substitutes web-define variables in `index.html`.
- `WebTemplatedFiles` substitutes web-define variables in
`flutter_bootstrap.js`.
  - `WebTemplatedFiles` works correctly with no web-define variables.
- All existing tests in `build_web_test.dart` (24/24), `web_test.dart`
(619/619), and `web_template_test.dart` (16/16) pass.

---------

Co-authored-by: Mouad Debbar <mdebbar@google.com>
2026-02-12 19:59:40 +00:00
Marijua ރ
a89a2ded8b
[Material] modernize legacy switch statements to expressions across multiple files (#181427)
This PR modernizes legacy switch statements across several Material
library files by converting them to Dart 3 switch expressions.

While exploring `dialog.dart` and `drawer.dart`, I noticed a recurring
pattern of using switch statements for platform-based variable
assignments (like semantic labels and boolean flags). I've expanded the
cleanup to include `app_bar.dart` and `bottom_sheet.dart` to ensure
consistency across the

-> All relevant tests passed (370+ tests total across `
dialog_test.dart`, `drawer_test.dart`, `app_bar_test.dart`, and
`bottom_sheet_test.dart`).

-> Verified with `flutter analyze` and `dart format`

## 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]. (I will sign it once the bot prompts me)
- [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] All existing and new tests are passing.

[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
2026-02-12 18:08:08 +00:00
Daco Harkes
6e459a3860
[native_assets] Fix flutter build ios-framework (#181507)
This PR fixes two issues. Accidental reuse of code assets between build
modes and SDKs (https://github.com/flutter/flutter/issues/181724), and
the bundling in ios-frameworks
(https://github.com/flutter/flutter/issues/181382).

To fix the accidental caching, the `Target`s related to build hooks and
code assets now output their files to `environment.outputDir` instead of
`$projectDir/$buildDir/native_assets`.

* `xcode_backend` is updated to deal with this.
* `Flutter.kt` has been updated to deal with this.
* Because the `Target`s are responsible for caching, the code has been
refactored to provide the target directories from there. The
"global-ish" function `nativeAssetsBuildUri` that was calculating the
directory before has been removed.
* `runFlutterSpecificHooks` has nothing to do with that directory, it's
access to it has been removed.
* To avoid another cmakefile migration, the Linux and Windows
implementation use the same directory. (Note that output dir and build
dir overlap for Linux and Windows, while they do not for MacOS, iOS, and
Android.)
* This also means that we don't have to read `NativeAssetsManifest.json`
in `xcode_backend` anymore. Instead the `Target` clears the output
directory, so we should not have any stale frameworks.
* Refactored `installCodeAssets` and its platform-specific
implementations to return a list of all produced files. These are now
added to the `Target`'s depfile. This fixes an issue where the build
system would skip re-installing native assets after an Xcode "Clean
Build Folder because it wasn't tracking the frameworks/dylibs as
outputs.

Closes: https://github.com/flutter/flutter/issues/181724

Other `Target`s related tweaks:

* Added proper
`Source.pattern('{BUILD_DIR}/${DartBuild.dartHookResultFilename}'),` for
all `Target`s that depend on that file. These were missing. (The build
system uses `dependencies` for ordering of `Target`s, but relies on
`inputs` and `outputs` for caching.)
* Removed code assets from `CopyAssets`. That target is supposed to make
an asset-bundle that is OS-independent if I understand correctly.

This PR changes the way code assets are bundled in `flutter build
ios-framework`.

* This PR now packages in an `.xcframework`, which is necessary to be
able to package both device and simulator.
* Run through the frameworks of both device and simulator and give
errors on inconsistencies.

Closes: https://github.com/flutter/flutter/issues/181382

Other iOS related tweaks:

* Use `xcrun` for invoking all the commands. (This is used for producing
the app framework, but was not for code assets frameworks.)
* Make sure all commands are added to the traces when running verbose.
(Also to bring it in line for with the other `xcrun` commands.)

Testing:

* The integration test is updated to inspect the `xcframework`s.
* Added a test that simulates Xcode "Product > Clean Build Folder...",
to check that it now correctly triggers a rebuild.
* We do _not_ have an integration test that _runs_ the frameworks output
from `flutter build ios-framework` inside a host app at all as far as
I'm aware.
* dev/devicelab/bin/tasks/build_ios_framework_module_test.dart builds a
framework, but doesn't run it in a host app
* dev/integration_tests/ios_add2app_life_cycle/build_and_test.sh runs,
but does so via `flutter build ios` not as a framework.
* Does not add an integration test for caching behavior between
switching build modes. However, the proper functioning of `flutter build
ios-framework` depends on the `Target`s for different not using
overlapping directories.

Architectural approaches tried but didn't work:

* Subclass `InstallCodeAssets` per OS to be more precise in the
`output`s on what files are output. This doesn't work because other
OS-independent targets on the `InstallCodeAssets` target.
2026-02-12 15:33:43 +00:00
Martin Kustermann
53bfd6d932
Mark all IconData fields as entrypoints to prevent tree shaking its fields (#181849)
Flutter's tree shaking of icon data in fonts examines the tree shaken
Kernel AST, searching for `IconData` constants. It will then examine
their fields in order to shake parts of fonts.

We should mark those fields as entrypoints to prevent the tree shaker
from removing the fields (an optimization that may land in [0]) as the
`const_finder` tool relies on them being there.

[0] https://dart-review.googlesource.com/c/sdk/+/472541
2026-02-12 09:46:44 +00:00
Tong Mu
5f49837cdd
Fix misleading error message for color/decoration conflict (relands #180325) (#181882)
_This PR is a clone of https://github.com/flutter/flutter/pull/180325
and relands it._

## Description

Fixes the contradictory error message that says "Cannot provide both...
To provide both".

Updated wording to match `Ink` and `AnimatedContainer` widgets which use
clearer phrasing.

## Related Issue

Fixes #119484

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

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

---------

Co-authored-by: Nathan Nguyen <nhan13574@gmail.com>
2026-02-12 01:48:23 +00:00
Gray Mackall
a191754c35
Make HCPP upgrading work for vd/tlhc (#181024)
Before the change we get a NPE when trying to cast the return of the
create message as an int.

There are also some more changes needed on top of the change to the
cast, making the `TextureAndroidViewController` aware of if it is using
HCPP and exposing that bool for use in
`packages/flutter/lib/src/rendering/platform_view.dart`

This is untested because it currently isn't possible to use HCPP without
uncommenting the code block here:
2beceb6b1c/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java (L95)

It will be tested in the follow up pr which adds the cli flag,
uncomments the block, and adds golden tests that we can upgrade each of
the 3 legacy modes.

Fixes https://github.com/flutter/flutter/issues/181000

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2026-02-11 22:31:25 +00:00
Mohellebi Abdessalem
b730ef582c
[Tool] Remove redundant name fields in an enum (#181674)
## 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].
- [ ] 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].
- [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
2026-02-11 21:16:33 +00:00