Ahmed Mohamed Sameh
bfb0be2167
Make sure that an InkWell doesn't crash in 0x0 environment ( #175871 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the InkWell widget.
Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
2025-10-10 04:58:52 +00:00
Ahmed Mohamed Sameh
6a424a63e3
Handle#6537 end drawer button ( #173026 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the EndDrawerButton
UI control.
---------
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-10 04:44:14 +00:00
Ben Konyi
bea9e8206c
[ Tool ] Roll package:dwds to 26.0.0 ( #176808 )
...
Fixes https://github.com/dart-lang/sdk/issues/61560
2025-10-09 23:29:37 +00:00
Qun Cheng
e89075c112
Announce text and button together when DropdownMenu is treated as a button ( #176428 )
...
Fixes https://github.com/flutter/flutter/issues/175950 .
This PR is to make screen reader announce the text field content and the
trailing button together on `DropdownMenu`. When the `DropdownMenu`
cannot be focused (`canRequestFocus()` is set to false), the "text
field" should be treated as if it is a button, and the trailing button
should **not** be announced separately. When the text field is
focusable, it's reasonable to separate text field and the trailing
button, so I leave it as is.
The native app doesn't announce "expanded"/"collapsed", so I use
`Semantics.hint` to achieve the goal.
This demo is to show the screen reader announcement.
https://github.com/user-attachments/assets/e7a9da8f-acf8-4018-a778-1ded1b07103c
## 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.
2025-10-09 21:35:21 +00:00
Gregory Conrad
903effa715
[native_assets] create macOS CCompilerConfig via xcrun --find ( #175717 )
...
Previously, the macOS `CCompilerConfig` for native assets was created
via running `xcrun clang --version`, but this is not always reliable
(i.e., when running under Nix on macOS). Thus, this commit introduces a
new mechanism to find the CCompilerConfig binaries using `xcrun --find`,
which is a more standard way of finding development-related binaries on
macOS (and is also properly supported in Nix's `xcrun` wrapper).
Fixes #175553
CC @dcharkes -- I think this is the last of the changes needed for Nix
support in Native Assets (as far as I can tell...)
## 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
2025-10-09 20:52:48 +00:00
Elijah Okoroh
e04f0bcfc3
Fix Xcode cache errors ( #175659 )
...
This PR fixes a race condition that causes intermittent build failures
on iOS with errors like no such file or directory. These failures were
frequently observed in CI tests running on macOS.
The root cause is that the background wireless device discovery process,
which uses `devicectl`, was not being terminated after a target device
was selected. This background process could then delete Xcode's module
caches while `xcodebuild` was actively using them, leading to a build
failure.
The fix ensures that the wireless device discovery process is explicitly
stopped at all logical exit points of the device discovery flow. This is
achieved by calling stopExtendedWirelessDeviceDiscovery() as soon as:
- A single specified device is found and validated.
- An ephemeral device is chosen.
- A user interactively selects a device from a list.
- The discovery process concludes in a non-interactive environment (like
CI).
This change prevents the devicectl process from running concurrently
with the app build, thus resolving the race condition and improving the
reliability of iOS builds.
### Testing:
- This is tested by checking the bringup to make sure the following
tests are passing:
* [Mac_arm64_ios
integration_test_test_ios](https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_ios%20integration_test_test_ios?limit=200 )
* [Mac_ios
wide_gamut_ios](https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20wide_gamut_ios?limit=200 )
* [Mac_ios
native_assets_ios](https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20native_assets_ios?limit=200 )
* [Mac_ios
spell_check_test](https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20spell_check_test?limit=200 )
* [Mac_ios
channels_integration_test_ios](https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20channels_integration_test_ios?limit=200 )
fixes #174444
## 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.
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
2025-10-09 19:18:12 +00:00
Ahmed Mohamed Sameh
9b8f242e9c
Make sure that a MenuBar doesn't crash in 0x0 environment ( #176368 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the MenuBar widget.
2025-10-09 19:14:55 +00:00
zhongliugo
681e34124b
Improve menu item accessibility semantics ( #176255 )
...
This PR addresses issue #171231 by enhancing the accessibility semantics
for `MenuItemButton` and `SubmenuButton`. Previously, screen readers did
not correctly announce the disabled state of these menu items.
This ensures that menu items are correctly identified as buttons and
their enabled/disabled state is communicated to assistive technologies.
**Before change**
https://button-0923-before.web.app/
**After change**
https://button-0923-after.web.app/
2025-10-09 15:05:45 +00:00
Huy
aa9c1c86a7
Fix ExpansionTile semantics hint for mismatched platforms ( #176689 )
...
- Address a partial issue within
https://github.com/flutter/flutter/issues/176566
- This PR proposes using `defaultTargetPlatform` instead of platform
from theme for Semantics hint in ExpansionTile widget (see use case at
https://github.com/flutter/flutter/issues/176566#issue-3486244630 ); also
add a test for it.
## 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
---------
Signed-off-by: huycozy <huy@nevercode.io>
2025-10-09 04:48:39 +00:00
Bruno Leroux
127519422a
Fix TextField does not inherit local InputDecorationTheme ( #176300 )
...
## Description
This PR replaces global `ThemeData.inputDecorationTheme` usage in
`TextField` with `InputDecorationTheme.of ` which returns the ambient
`InputDecorationTheme`.
It is a follow up to https://github.com/flutter/flutter/pull/168981
which introduces `InputDecorationTheme.of `.
## Related Issue
Fixes [[SearchBar] Inconsistent inheritance of
InputDecorationTheme](https://github.com/flutter/flutter/issues/176198 )
## Tests
- Adds 1 test
- Updates 1 test
2025-10-09 04:47:04 +00:00
Bruno Leroux
45637be5ce
Fix DropdownButtonFormField does not inherit local InputDecorationTheme ( #176564 )
...
## Description
This PR replaces global `ThemeData.inputDecorationTheme` usage in
`DropdownButtonFormField` with `InputDecorationTheme.of ` which returns
the ambient `InputDecorationTheme`.
It is a follow up to https://github.com/flutter/flutter/pull/168981
which introduces `InputDecorationTheme.of `.
## Related Issue
Fixes [DropdownButtonFormField does not inherit local
InputDecorationTheme](https://github.com/flutter/flutter/issues/176561 )
## Tests
- Adds 1 test
2025-10-09 04:38:46 +00:00
Ahmed Mohamed Sameh
294961296a
Make sure that a MenuItemButton doesn't crash in 0x0 environment ( #176419 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the MenuItemButton
widget.
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-09 03:40:15 +00:00
Ahmed Mohamed Sameh
444420e688
Make sure that a NavigationBar doesn't crash in 0x0 environment ( #176731 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the NavigationBar
widget.
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-09 03:38:11 +00:00
Ahmed Mohamed Sameh
600cb9c49e
Make sure that a Material doesn't crash in 0x0 environment ( #176231 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Material widget.
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-09 03:34:14 +00:00
Ahmed Mohamed Sameh
1126dc3793
Make sure that a FloatingActionButton doesn't crash in 0x0 environment ( #175272 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
FloatingActionButton widget.
2025-10-09 00:16:54 +00:00
Huy
c5228651d0
Fix RadioButton is not vocalized as unselected by VoiceOver ( #175926 )
...
### Issue
- Fix https://github.com/flutter/flutter/issues/170422
### Description
This PR proposes a fix by adding a hint to Semantics here:
b220f5a2ab/packages/flutter/lib/src/widgets/raw_radio.dart (L217-L222)
The hint is only available on iOS &macOS platforms with a localized
string for `unselected` state to prevent regression on Android, which
works as expected currently and this seems to be the only solution as
investigated below ⬇️
<details open>
<summary>Demo the fix</summary>
https://github.com/user-attachments/assets/56c1c6c9-5178-45be-a633-47145a0543d6
</details>
#### Why can't we make it simpler with Semantics flags only?
- I looked at
[UIAccessibilityTraits](https://developer.apple.com/documentation/uikit/uiaccessibilitytraits ),
it seems the
[selected](https://developer.apple.com/documentation/uikit/uiaccessibilitytraits/selected )
property does announce `selected` state, but it does not mention or give
hints for `unselected` state.
-
[L824-L828](e8bef98051/engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm (L824-L828) )
in Flutter source code does mention radio button: Looks like I can try
marking both toggle and check, but it's impossible, due to an assertion:
[A semantics node cannot be toggled and checked at the same
time](35375e43fb/packages/flutter/lib/src/rendering/object.dart (L4807-L4809) )
➡️ Not sure which flags can trigger `unselected` state implicitly.
#### How do iOS native apps work?
I did test with two approaches:
1. iOS Reminders app:
VoiceOver vocalizes as follows:
Unchecked radio: "...Incomplete..."
checked radio:"...Completed..."
<details>
<summary>Demo video</summary>
https://github.com/user-attachments/assets/6bed5d14-ded8-47c2-9c09-7afc266898cc
</details>
2. Build Radio with SwiftUI
Looks like [there is no built-in widget for Radio provided by
Apple](https://www.reddit.com/r/SwiftUI/comments/1gsh7zo/does_swiftui_have_a_builtin_radiobutton_in_2024/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button ).
[Is it really a native iOS
component?](https://www.reddit.com/r/SwiftUI/comments/1gsh7zo/comment/lxea1uf/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button )
Most of results I have found suggest building radio from a button with
changing image source(selected/unselected, respectively), as I do in
this SwiftUI code here:
https://gist.github.com/huycozy/93b12c030651c4fde6fe8fceda1ba1ee . We can
control what the reader vocalizes by setting traits and value for it
manually. This being said, setting accessibility hint or value from
Flutter side makes sense in this case. Please let me know if I am
missing something.
<details>
<summary>Demo video</summary>
https://github.com/user-attachments/assets/118c89c5-46a3-497f-8b2a-6f7c5ae8edf3
</details>
## 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
---------
Signed-off-by: huycozy <huy@nevercode.io>
Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
2025-10-09 00:12:33 +00:00
Ahmed Mohamed Sameh
e055ca0b91
Make sure that a RadioMenuButton doesn't crash in 0x0 environment ( #176516 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the RadioMenuButton
widget.
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-09 00:07:14 +00:00
Ahmed Mohamed Sameh
a2a56c2939
Make sure that an InputDecorator doesn't crash in 0x0 environment ( #176116 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the InputDecorator
widget.
---------
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-09 00:05:58 +00:00
PurplePolyhedron
07928d5f89
Fix Scaffold having status bar when primary is false ( #175156 )
...
When primary is false, `Scaffold` is not at the top of screen, so it
should not have a status bar.
fixes https://github.com/flutter/flutter/issues/175062
## 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.
**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
2025-10-09 00:04:12 +00:00
flutter-pub-roller-bot
18f1a2a334
Roll pub packages ( #176743 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
2025-10-09 00:04:10 +00:00
Ahmed Mohamed Sameh
112f859bfe
Make sure that a Divider doesn't crash in 0x0 environment ( #174709 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Divider widget.
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-08 19:20:10 +00:00
Valentin Vignal
6e5d0079d5
Simplify if-else block into single return statement ( #175574 )
...
Follow up of https://github.com/flutter/flutter/pull/175396
This PR applies the code change suggestion from gemini review
## 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
---------
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-08 19:18:58 +00:00
Ahmed Mohamed Sameh
a345163616
Make sure that a DesktopTextSelectionToolbarButton doesn't crash in 0… ( #173827 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
DesktopTextSelectionToolbarButton UI control.
---------
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-10-08 19:17:21 +00:00
Kostia Sokolovskyi
fc8f60345a
Add saturation ColorFilter. ( #176464 )
...
Closes https://github.com/flutter/flutter/issues/166589
This PR is a continuation of
https://github.com/flutter/flutter/pull/167898 , which was closed due to
the lack of web implementation. Thanks to @lukepighetti and
@benthillerkus for their work on the closed PR.
### Description
- Adds `ColorFilter.saturation`
https://github.com/user-attachments/assets/67d8acf0-35d0-42de-a24b-f24eed14e9a8
## 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
2025-10-08 19:13:02 +00:00
Elijah Okoroh
2586c9c18e
Add structured warning event for slow wireless debugging on iOS 26+ d… ( #176673 )
...
This PR improves the developer experience when running or debugging
Flutter apps on iOS 26+ devices connected via WiFi. The tool now emits a
structured `app.warning` event (in addition to a console warning) when
it detects wireless debugging on iOS 26 or later. This allows IDEs and
other tools using `--machine` mode to display a prominent warning to
users, encouraging them to use a wired (USB) connection for better
performance.
## Details
- Detects when an iOS device is:
- Running iOS 26 or later,
- Connected wirelessly,
- Debugging is enabled.
- Emits a human-readable warning to the console.
- Emits a structured `app.warning` event with relevant metadata
(category, deviceId, iosVersion, suggestion, etc.) for IDEs and tools
using `--machine` mode.
- No changes to existing workflows for users not matching these
conditions.
*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 #176206
*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.
- [] 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.
- [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
2025-10-08 19:06:34 +00:00
Kishan Rathore
7100df24f6
Feat: Add carousel view builder ( #172837 )
...
Add carousel view builder named constructor
Fixes : #170692
## 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.
2025-10-08 03:29:35 +00:00
Bruno Leroux
8c4e1057e0
Fix InputDecoration helper/error padding is not compliant ( #176353 )
...
## Description
This PR fixes the InputDecoration helper/error padding.
When a counter is defined, this PR fixes the width of the gap between
helper/error and the counter.
M3 specs:
<img width="1090" height="430" alt="Screenshot 2025-10-07 at 5 36 05 PM"
src="https://github.com/user-attachments/assets/cf83b30b-4cfb-4379-8cb0-7e35cd5fe414 "
/>
## Before
<img width="759" height="172" alt="image"
src="https://github.com/user-attachments/assets/b8f733f5-4688-478a-b475-06130e4f6691 "
/>
## After
<img width="759" height="172" alt="image"
src="https://github.com/user-attachments/assets/a40eb328-8447-4c24-9ced-95ea619f2e1c "
/>
## Related Issue
Fixes [InputDecoration helper/error end padding is not compliant with M3
spec](https://github.com/flutter/flutter/issues/175993 )
## Tests
- Adds 2 tests. One to verify the new padding. Another to verify the
change in intrinsic height calculation. This second test does not fail
without the PR but it would have failed if the PR changes only the
padding and did not update the intrinsic height logic.
- Updates 1 test related to the gap between error/helper and counter.
2025-10-08 01:20:29 +00:00
Kostia Sokolovskyi
1cee136823
Fix PopupMenu does not update when PopupMenuTheme in Theme changes. ( #175513 )
...
Fixes https://github.com/flutter/flutter/issues/43824
### Description
- Fixes `PopupMenu` does not update when `PopupMenuTheme` in `Theme`
changes
<details closed><summary>Code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() => runApp(const App());
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: const ColorScheme.light(),
popupMenuTheme: PopupMenuThemeData(
elevation: 10,
color: Colors.red,
shadowColor: Colors.black,
surfaceTintColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
menuPadding: EdgeInsets.all(10),
),
),
darkTheme: ThemeData(
colorScheme: const ColorScheme.dark(),
popupMenuTheme: PopupMenuThemeData(
elevation: 20,
color: Colors.blue,
shadowColor: Colors.white,
surfaceTintColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
menuPadding: EdgeInsets.all(20),
),
),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Hello Flutter'),
actions: [
PopupMenuButton<int>(
itemBuilder: (context) => <PopupMenuEntry<int>>[
const PopupMenuItem<int>(value: 1, child: Text('Item 1')),
const PopupMenuItem<int>(value: 2, child: Text('Item 2')),
const PopupMenuItem<int>(value: 3, child: Text('Item 3')),
],
)
],
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [Text('Nothing here')],
),
),
);
}
}
```
</details>
| BEFORE | AFTER |
| - | - |
| <video alt="before"
src="https://github.com/user-attachments/assets/cb8450fe-9426-481f-bff8-2d690486a36a "
/> | <video alt="after"
src="https://github.com/user-attachments/assets/86bbfb46-8b9c-4ad0-b45e-8733861123ad "
/> |
## 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
2025-10-08 00:27:22 +00:00
Ben Konyi
c8c09f6d05
[ Tool ] Output app.dtd and app.devTools in machine mode ( #176655 )
...
Fixes https://github.com/flutter/flutter/issues/176310
2025-10-07 22:55:27 +00:00
Elliott Brooks
a50b9d56d4
Selecting an implementation widget with the on-device inspector opens the code location for the nearest project widget ( #176530 )
...
Fixes https://github.com/flutter/devtools/issues/9252
Previously, if a user selected a widget that was not created in their
project files using the on-device inspector, we would open the code
location for that widget. Now, we open the code location of the nearest
ancestor widget in their project files. (e.g., a user selects `RichText`
in the framework, we open the `Text` widget in their project)
Users can still open the code location for a Flutter framework or
third-party package widget by explicitly selecting it in the DevTools
widget tree. See more details/rationale on issue comment
https://github.com/flutter/devtools/issues/9252#issuecomment-3368491936
_Note: This resolves one of the top user complaints in the 2025 DevTools
user survey._

2025-10-07 21:05:21 +00:00
Valentin Vignal
3dbd33d3aa
Migrate to WidgetStateInputBorder ( #176386 )
...
Follow up https://github.com/flutter/flutter/pull/176330
Migrate the remaining files from `MaterialStateOutlineInputBorder` and
`MaterialStateUnderlineInputBorder ` to `WidgetStateInputBorder `. This
PR only focus on `WidgetStateInputBorder`.
- This minimizes conflicts and reduces the size of the PR for easier
reviews and follow up
- I'll work on the other elements of
`packages/flutter/lib/src/material/material_state.dart` into other PRs
## 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
2025-10-07 20:13:57 +00:00
Ben Konyi
38dc1c88e9
[ Widget Preview ] Rework UI and theming ( #176581 )
...
This change consists of several UI changes:
- Added theming support for light and dark mode based on system
preferences
- Pulled in a subset of the DevTools theming constants
- Reduced size of widget preview buttons and controls
- Added initial support for setting theme based on IDE parameters passed
as query parameters. This does not include responding to theme changes
made after the widget previewer is loaded.
- Fixed issue where the `WidgetPreviewErrorWidget` would still show
controls, even though they aren't relevant
**IDE Theming Example:**
<img width="1149" height="571" alt="image"
src="https://github.com/user-attachments/assets/d84beacd-6b1c-4186-b793-88aae58613c1 "
/>
2025-10-07 03:37:53 +00:00
Robert Ancell
bdbffa11cd
Fix code style in Linux embedder template ( #176256 )
...
As noticed by Gemini in another PR
2025-10-07 02:14:21 +00:00
Victoria Ashworth
af8e9801a4
Add tooling to migrate to UIScene ( #176427 )
...
Migrates Flutter iOS apps to be compatible with UIScene lifecycle by
migrating the AppDelegate and Info.plist. If the AppDelegate does not
match Flutter's original template exactly, or if the Info.plist is not
found or can't be updated, then prompt the user to migrate manually.
This is hidden behind a feature flag so we can test it out first.
Fixes https://github.com/flutter/flutter/issues/170167 .
## 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
2025-10-07 02:12:26 +00:00
Thomas Duffin
5a6ba3c355
Fix typo in pages.dart ( #176438 )
...
<!--
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
-->
Fixes a minor typo in a doc comment for `PageRouteBuilder`. There's no
specific issue for this as I wasn't sure that was a necessary step for
typo PRs, but one can be made if necessary.
## 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.
- Do I need an issue opened for a minor typo?
- [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
2025-10-06 19:46:19 +00:00
Kishan Rathore
fafb7a2a31
Fix: Update anchorRect for overlayBuilder when anchor moves ( #169814 )
...
Fix: Update anchorRect for overlayBuilder when anchor moves
fixes : #169457
part of https://github.com/flutter/flutter/issues/173440
## 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.
2025-10-06 19:09:24 +00:00
Ben Konyi
04f323450d
[ Widget Preview ] Fix WidgetInspectorService override ( #176550 )
...
When registering the `WidgetPreviewScaffoldInspectorService`, we were
originally setting it after the bindings were initialized. This meant
that the widget inspector service extensions were registered with the
original `WidgetInspectorService` and were not taking the custom
codepaths in the override.
This change moves the `WidgetPreviewScaffoldInspectorService`
initialization to before the bindings are initialized.
2025-10-06 16:48:09 +00:00
Bruno Leroux
b5aef9c366
Fix NavigatorBar lacks visual feedback ( #175182 )
...
## Description
This PR fixes NavigationBar lacking visual feedback on the active
destination indicator.
This is a reland of https://github.com/flutter/flutter/pull/164484 which
was reverted in https://github.com/flutter/flutter/pull/169497 .
After investigation, I narrowed down the regression introduced in
https://github.com/flutter/flutter/pull/164484 to the usage of a
RepaintBoundary.
I added one test to verify that the regression which led to the revert
of https://github.com/flutter/flutter/pull/164484 is no more
reproducible.
### Before:
The navigation indicator does not change color when hovered or focused:
https://github.com/user-attachments/assets/a1e67dee-4a38-4711-ba90-bdcd9bed3226
### After:
The navigation indicator color changes (slightly darker):
https://github.com/user-attachments/assets/1b1cc335-2cf4-4c41-9c53-696537707c72
## Related Issue
Fixes [NavigationBar lacks visual feedback when focused or
hovered](https://github.com/flutter/flutter/issues/163871 )
## Tests
- Updates several helper functions which are used by several tests.
- Updates several test: adding an Ink widget changes the coordinates
used in several tests because these coordinates are now relative to the
Ink offset.
- Add one test to check that active destination moves to the correct
destination (that was not the case after
https://github.com/flutter/flutter/pull/164484 ). This new test is a
golden test.
2025-10-06 16:39:19 +00:00
Ben Konyi
0400e2cf77
[ Widget Preview ] Fix type error when retrieving flags from persistent preferences ( #176546 )
...
Also moves `dtd_services_test.dart` to actually use the
`WidgetPreviewScaffoldDtdServices` implementation, which would have
caught the typecast issue in the implementation.
2025-10-06 12:19:29 +00:00
Bruno Leroux
067d793084
Fix TextFormField does not inherit local InputDecorationTheme ( #176397 )
...
## Description
This PR replaces global `ThemeData.inputDecorationTheme` usage in
`TextFormField` with `InputDecorationTheme.of ` which returns the
ambient `InputDecorationTheme`.
It is a follow up to https://github.com/flutter/flutter/pull/168981
which introduces `InputDecorationTheme.of `.
## Related Issue
Fixes [TextFormField does not inherit local
InputDecorationTheme](https://github.com/flutter/flutter/issues/176391 )
## Tests
- Adds 1 test
2025-10-04 06:55:27 +00:00
davidhicks980
a23805768d
[material/menu_anchor.dart] Check for reserved padding updates on layout delegate. ( #176457 )
...
<!--
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 diffs reservedPadding when checking whether a menu anchor's
SingleChildLayoutDelegate should relayout.
Resolves https://github.com/flutter/flutter/issues/176456
## 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
2025-10-03 23:32:30 +00:00
LouiseHsu
22a2203888
Fix Voiceover traversal for OutlinedButton.icon ( #175810 )
...
Fixes #172489
When an OutlinedButton.icon is initially built with a null icon and
later updated to display an icon, the underlying widget implementation
changes. The button switches from a standard OutlinedButton to a private
_OutlinedButtonWithIcon widget.
This switch causes the button's entire semantic node to be destroyed and
a new one created in its place. For screen readers like VoiceOver, this
behavior is disruptive. If an accessibility service is focused on the
button when its icon appears, that focus is lost because the original
semantic node is discarded, leading to strange behaviour as it makes an
best effort to focus on an existing node.
This PR resolves the issue by ensuring the same widget is used
regardless of whether the icon is present. The logic for
_OutlinedButtonWithIcon has been merged into the base class
OutlinedButton, ensuring that no matter if you call OutlinedButton.icon
or OutlinedButton you recieve a widget of type OutlinedButton.
Demo:
https://github.com/user-attachments/assets/e012bac9-823e-46f1-8eba-ec70e6b260a1
2025-10-03 18:02:35 +00:00
Slava Egorov
c9f10779f4
Upgrade packages ( #176411 )
...
Changes to the Dart IO require picking up newer version of
`package:watcher`.
2025-10-02 18:01:21 +00:00
Qun Cheng
17e2120be8
Update localization from translation console ( #176324 )
...
Regular import of latest translations.
Some .arb files(cupertino_ko.arb, and material_it.arb) are overwritten
again and will cause translation issues. See comment
https://github.com/flutter/flutter/pull/166496#issuecomment-2773987516 .
I manually reverted them back.
This PR doesn't run the date_localization script.
## 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.
2025-10-02 17:38:15 +00:00
jesswrd
f58eada931
Update Framework CI to Use NDK r28c ( #176214 )
...
Updating Framework CI to use new SDK revision containing NDK r28c. Have
to update the flutter.ndkVersion constant in this PR as well otherwise
there will be a mismatch in versions.
Partially Addresses https://github.com/flutter/flutter/issues/175022
## 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.
- [ ] 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
2025-10-02 17:02:09 +00:00
Kate Lovett
1c15d39b18
Fix platform specific semantics for time picker buttons ( #176373 )
...
Updated from https://github.com/flutter/flutter/pull/173418
Fixes https://github.com/flutter/flutter/issues/173302
Applied review feedback and modified for time licker refactor that
landed somewhere in between.
## 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].
- [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
2025-10-02 15:32:09 +00:00
Ben Konyi
f35a2875ae
[ Widget Preview ] Fix resolution for workspace "hosted" dependencies ( #176358 )
...
Projects within the same workspace can depend on each other without
explicitly specifying path dependencies or dependency overrides using
the following syntax:
```
dependencies:
my_workspace_project: # No constraint or path
```
This is treated as a "hosted" dependency, which conflicts with the path
dependencies used by the widget_preview_scaffold.
This change introduces dependency_overrides for each package in the
workspace watched by the widget previewer to allow for dependencies to
be resolved correctly.
Fixes https://github.com/flutter/flutter/issues/176018
2025-10-02 11:13:41 +00:00
Ben Konyi
23a9ce38af
[ Widget Preview ] Persist "Filter by Selected File" toggle ( #176289 )
...
This change introduces `PersistentPreferences`, which allows for the
widget previewer to save settings to disk.
`PersistentPreferences` makes use of the existing `~/.flutter-devtools`
directory used by DevTools for the same purpose, writing preferences in
JSON format to `~/.flutter-devtools/.widget-preview`.
2025-10-01 22:39:09 +00:00
chunhtai
a3eba8eab2
Reapply "Update the AccessibilityPlugin::Announce method to account f… ( #176107 )
...
…… (#174365 )"
This reverts commit 5e146d47a61098e5ed967352812bcbbe0fe24f20.
<!--
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
-->
straight reland, previous pr was reverted because g3fix is outdated
## 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
2025-10-01 22:34:09 +00:00
Ben Konyi
40f013a0e9
[ Tool / l10n ] Fix issue where localization generator assumed current directory was the target project ( #175881 )
...
When running `flutter pub get` from the root of a Pub workspace,
localizations are generated for each subproject. However, we were trying
to write the untranslated messages file relative to the current
directory, not the target project's directory.
This change updates the logic for determining the output location of the
untranslated messages file to include the target project root.
Fixes https://github.com/flutter/flutter/issues/174205
2025-10-01 20:04:07 +00:00