26015 Commits

Author SHA1 Message Date
Kevin Moore
e979e166d6
[tool] Fix IP parsing by using Uri constructor (#178083)
Also DRY'd up use of `"any"` constant is several places.

Fixes https://github.com/flutter/flutter/issues/178082
2025-11-06 21:01:18 +00:00
Victoria Ashworth
ac3b91db0d
Hide SwiftPM warnings on non-mac platforms (#178073)
Fixes https://github.com/flutter/flutter/issues/162594.

## 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-11-06 15:40:15 +00:00
Robert Ancell
c5e809a998
Remove WindowingOwner.hasTopLevelWindows (#178033)
This function doesn't seem to serve any purpose.
Top level is not a term we are currently using in the multi window code.
If we want to track if we have open windows, this can be done in the
Flutter framework - it doesn't need to be done at the platform level.
2025-11-06 13:11:28 +00:00
Bruno Leroux
c093967de2
Fix DropdownMenu escape key does not close the menu (#178002)
## Description

This PR fixes escape key not closing the menu when
`DropdownMenu.requestFocusOnTap` is false.

## Related Issue

Fixes [DropdownMenu menu panel does not close when pressing ESC and
requestFocusOnTap is
false](https://github.com/flutter/flutter/issues/177993)
Part of https://github.com/flutter/flutter/issues/123797
 
## Tests

- Adds 3 tests.
- Updates 2 non-related tests where I spotted some nits.
2025-11-06 10:34:26 +00:00
Tirth
6f4a8c784e
Update documentation tool reference in image.dart (#177782)
<!--
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
-->

Uses `@tool sample` instead of `@tool dartdoc` for one of the
ImageProvider's example in docs. Similar fix as #175256.
Fixes #155935

## 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-11-06 07:06:26 +00:00
Lau Ching Jun
f066ed6591
Revert "Refactor OverlayPortal semantics (#173005)" (#178007)
This reverts commit ccf6466b14e144971a7d65983bdd16459d65a62a.

~This is a test PR for investigation, the commit seems to be breaking a
customer app.~

The original PR caused b/457553134
2025-11-06 03:41:26 +00:00
Jaineel Mamtora
8892bc8fed
fix: inconsistent horizontal spacing between hours and mins in time picker for non-english language (#173706)
<!--
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 aims to fix an open issue:
https://github.com/flutter/flutter/issues/173621

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

## Screenshots

Please find below the _before_ and _after_ screenshots 

- Before
<img width="294" height="264" alt="before_fixing_spacing"
src="https://github.com/user-attachments/assets/ce519c72-cb5e-4f08-8976-abb01f9eb76d"
/>

- After
<img width="294" height="261" alt="after_fixing_spacing"
src="https://github.com/user-attachments/assets/f010cbbf-680d-495b-a028-16c7fbdb9a09"
/>


<!-- 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-11-05 22:15:32 +00:00
Elijah Okoroh
9d88f8e9dd
Fix(ios): Remove arm64 exclusion to support Xcode 26 simulators (#177065)
With the release of Xcode 26, Apple has removed Rosetta support for the
iOS 26 simulator. This causes builds to fail on Apple Silicon Macs if
any plugin excludes the `arm64` simulator architecture.

This change introduces an early check during the pod install step to
detect and abort the build if it finds a plugin configured to exclude
the arm64 simulator architecture (via EXCLUDED_ARCHS or VALID_ARCHS).

## Testing

- Verified that the build is unsuccessful when `arm64` is excluded.
- If a plugin excludes arm64, an error is raised showing the plugin that
caused it

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

*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].
- [ ] 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-11-05 22:11:09 +00:00
Luke Memet
c652b53819
Fix ReorderableList items jumping when drag direction reverses mid-animation (#173241)
When rapidly dragging items in a ReorderableList before animations
complete, items would jump to their expected positions rather than
smoothly transitioning.

## Problem

<p align="center">
<img
src="https://github.com/user-attachments/assets/0efb250c-2960-4942-959f-59eccc20cefb"
alt="demo2" width="250">
</p>

The issue occurs when a reorder animation is interrupted by starting a
new drag operation. The interrupted animation would reset to the
starting position of the original animation rather than capturing the
current animated position, causing a visual jump.

## Solution

This PR fixes the issue by:
1. Storing the previous target offset before updating to a new target
2. When an animation is interrupted, calculating the actual current
position based on the animation's progress
3. Using this calculated position as the new starting point for the next
animation

<p align="center">
<img
src="https://github.com/user-attachments/assets/c24e4834-1c6b-41c1-8f44-17b4c79e0993"
alt="demo2" width="250">
</p>

This PR is part of a series of `ReorderableList` enhancements I've
developed for [TimeFinder](https://timefinder.app):
- #172740
- #172380
- #172739
- #172738

Fixes #173243

## Code Changes

```dart
// Before
_startOffset = offset;

// After  
final double currentAnimValue = Curves.easeInOut.transform(_offsetAnimation\!.value);
final Offset currentPosition = Offset.lerp(_startOffset, previousTarget, currentAnimValue)\!;
_startOffset = currentPosition;
```

This ensures smooth transitions without visual jumping, making rapid
reordering gestures feel more responsive and natural.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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 [migration
guide] as needed.
- [x] All existing and new tests are passing.
- [x] The analyzer (`flutter analyze --flutter-repo`) does not report
any problems on my PR.
- [x] I am willing to follow-up on review comments in a timely manner.

[Contributor Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[test-exempt]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[migration guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#create-a-migration-guide
2025-11-05 00:20:33 +00:00
Ben Konyi
0359d52908
[ Widget Preview ] Add analytic event that's reported when the previewer is opened (#177949)
With the addition of IDE support, the widget previewer is often started
by default by IDE plugins, even if users don't open the previewer. This
change adds an additional analytics event which is reported once the
widget preview application is loaded and connects to the DTD instance.

Fixes https://github.com/flutter/flutter/issues/177948
2025-11-04 00:57:53 +00:00
Hannah Jin
ed19f47bec
Add blockAccessibilityFocus flag (#175551)
Add a new flag for a11y focusable

- Accessibility focus, which is the focus used by screen readers like
TalkBack and VoiceOver, is different from input focus.
- Our current logic use some existing flags to decide if a node is
accessibilty focusable. like "if it's a slider / has a check state / has
keyboard focus/..., then it's a11y focusable"
ecbb115ae3/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java (L98)
- but we lack the ability to explicitly set a node to be unfocusable in
a11y!
- This flag can be used to explicitly set some semantics nodes to be
unfocusable in a11y mode. if it is false, we fall back to the logic "if
it's a slider / has a check state / has keyboard focus/..., then it's
a11y focusable"

future use case 1:
user can set live region to be not focusable, so when content changes,
it will still announce, but the content can't be focused by swiping.
future use case 2:
when pushing a new route like a dialog, setting the semantics nodes in
old pages to be un focusable.




## 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-11-03 22:18:33 +00:00
Ahmed Mohamed Sameh
43f7a1ea1b
Make sure that a SnackBarAction doesn't crash in 0x0 environment (#177899)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the SnackBarAction
widget.
2025-11-03 21:30:23 +00:00
Ahmed Mohamed Sameh
77920e15d7
Make sure that a SelectionArea doesn't crash in 0x0 environment (#177876)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the SelectionArea
widget.
2025-11-03 21:30:22 +00:00
Ahmed Mohamed Sameh
4d10e0c169
Make sure that GridTile doesn't crash in 0x0 environment (#175321)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the GridTile widget.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-03 19:44:08 +00:00
Ahmed Mohamed Sameh
0908c2e225
Make sure that a Slider doesn't crash in 0x0 environment (#177882)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Slider widget.
2025-11-03 19:42:15 +00:00
Ahmed Mohamed Sameh
8e567b884d
Make sure that a CheckedPopupMenuItem doesn't crash in 0x0 environment (#177545)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
CheckedPopupMenuItem widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-03 18:08:25 +00:00
Adam Spivak
b87e863b80
Update pubspec.yaml.tmpl build version tracker on line 5 (#173600)
<!--
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
-->

Added a default +1 build number to the version field in
pubspec.yaml.tmpl (line 5). This ensures consistent versioning behavior
across iOS and Android for newly created Flutter projects.

Why this change?
- On iOS, CFBundleShortVersionString (marketing version) must be numeric
(major.minor.patch) and does not include the build number unless
explicitly set.
- On Android, the version name and version code can both be set,
allowing more flexibility in representing the build number.
- Without a build number in pubspec.yaml, Android defaults to +1 while
iOS omits it, resulting in inconsistent version strings between
platforms.

Benefits
- Consistency: Both iOS and Android builds will start with the same
format, e.g., 1.0.0+1.
- Clarity: New projects have a visible build number by default, reducing
confusion for new developers.
- Best Practice: Aligns with Apple’s numeric marketing version rules
while preserving Android’s flexibility.

Developers can still override --build-name and --build-number as needed
for custom versioning.
*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.*

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

## 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: Ben Konyi <bkonyi@google.com>
2025-11-03 16:10:09 +00:00
August
bf4957815e
docs: Default Splash / Loading screen for web app in index.html (#177084)
Contributes to #102178

First I wanted to cherry-pick
https://github.com/flutter/gallery/pull/630. But then I noticed that
there already exists a documentation:
https://docs.flutter.dev/platform-integration/web/initialization.
As most users won't expect this to be customizable (as myself), I wrote
a little docs in the index.html.tmpl that link to this page.

https://docs.flutter.dev/platform-integration/web/initialization#example-display-a-progress-indicator

I still think a default splash screen should be in place, e.g. by
providing the `flutter_bootstrap.js` by 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.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

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

<!-- 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-11-03 15:21:21 +00:00
Ahmed Mohamed Sameh
f07d882efb
Make sure that a PopupMenuItem doesn't crash in 0x0 environment (#177533)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the PopupMenuItem
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-03 06:40:30 +00:00
Ahmed Mohamed Sameh
50d03ed339
Make sure that a RefreshProgressIndicator doesn't crash in 0x0 enviro… (#177556)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
RefreshProgressIndicator widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-03 06:36:25 +00:00
Ahmed Mohamed Sameh
902a697692
Make sure that a PopupMenuButton doesn't crash in 0x0 environment (#177493)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the PopupMenuButton
widget.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-03 01:25:24 +00:00
Ahmed Mohamed Sameh
4499cf6e89
Make sure that a CircularProgressIndicator doesn't crash in 0x0 envir… (#177555)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
CircularProgressIndicator widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-03 01:21:38 +00:00
Ahmed Mohamed Sameh
518722ab1a
Make sure that a Radio doesn't crash in 0x0 environment (#177580)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Radio widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 22:18:03 +00:00
Ahmed Mohamed Sameh
f311a23424
Make sure that a RadioListTile doesn't crash in 0x0 environment (#177576)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the RadioListTile
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 20:40:50 +00:00
Ahmed Mohamed Sameh
9c056ed84e
Make sure that an ExpandIcon doesn't crash in 0x0 envrionment (#175042)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the ExpandIcon
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 20:39:35 +00:00
Ahmed Mohamed Sameh
ab479438cf
Make sure that a RangeSlider doesn't crash in 0x0 environment (#177642)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the RangeSlider
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 20:25:57 +00:00
Ahmed Mohamed Sameh
b0f5cda78e
Make sure that a GridTileBar doesn't crash in 0x0 environment (#177546)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the GridTileBar
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 20:25:57 +00:00
Ahmed Mohamed Sameh
647ce0c00a
Make sure that a LinearProgressIndicator doesn't crash in 0x0 environ… (#177553)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
LinearProgressIndicator widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 20:25:56 +00:00
Ahmed Mohamed Sameh
6a3011b4e1
Make sure that a PopupMenuDivider doesn't crash in 0x0 environment (#177445)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the PopupMenuDivider
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 20:05:34 +00:00
Ahmed Mohamed Sameh
71ac4b2fdb
Make sure that a PaginatedDataTable doesn't crash in 0x0 environment (#177389)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
PaginatedDataTable widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 20:04:03 +00:00
Ahmed Mohamed Sameh
a52e28e0cd
Make sure that an OutlinedButton doesn't crash in 0x0 environment (#177340)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the OutlinedButton
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 20:01:55 +00:00
Ahmed Mohamed Sameh
285e6f06ad
Make sure that a MenuAnchor doesn't crash in 0x0 environment (#176302)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the MenuAnchor
widget.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 19:59:05 +00:00
Ahmed Mohamed Sameh
604bc866a4
Make sure that a CheckboxListTile doesn't crash in 0x0 environment (#173151)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the CheckboxListTile
UI control.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 19:57:01 +00:00
Ahmed Mohamed Sameh
93999e1edb
Make sure that an IconButton doesn't crash in 0x0 environment (#175372)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the IconButton
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 19:55:45 +00:00
Ahmed Mohamed Sameh
95900da253
Make sure that an ElevatedButton doesn't crash in 0x0 environment (#175006)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the ElevatedButton
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 19:55:45 +00:00
Ahmed Mohamed Sameh
c30e5d4161
Make sure that a FilledButton doesn't crash in 0x0 environment (#175110)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the FilledButton
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-11-02 19:54:57 +00:00
Ahmed Mohamed Sameh
46c3f84370
Make sure that a SegmentedButton doesn't crash in 0x0 environment (#177773)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the SegmentedButton
widget.
2025-11-02 19:53:57 +00:00
Ahmed Mohamed Sameh
15d2e56b4e
Make sure that a SearchBar doesn't crash in 0x0 environment (#177761)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the SearchBar widget.
2025-11-02 19:52:00 +00:00
Ahmed Mohamed Sameh
5e348fd892
Make sure that a Scaffold doesn't crash in 0x0 environment (#177722)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Scaffold widget.
2025-11-02 19:33:46 +00:00
Ahmed Mohamed Sameh
dc7da2b3fe
Make sure that a Scrollbar doesn't crash in 0x0 environment (#177724)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Scrollbar widget.
2025-11-02 19:33:46 +00:00
Bui Dai Duong
7efa2aed3c
Colored box optimization (#176028) (#176073)
This PR fixed visual bug when placing multiple `ColoredBox`s together.
(Fixes #176028)

## 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: Victor Sanni <victorsanniay@gmail.com>
2025-11-02 18:59:19 +00:00
Pierre
f234d26926
Clean up links to docs website (#177792)
- remove link without use (PowerShell version minimum not reached, this
is not mentionned anywhere in Windows installation / troubleshooting
documentation)
- clean up API docs root
- clean up app template links, add `Learn Flutter` link
- update get started links
- replace `flutter.dev/docs` with `docs.flutter.dev`
- fix embedder descriptions
- fix broken API `docs.flutter.io` links
- http → https 
- remove `/install` from `/get-started` links
- fix Android Studio link

## 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: Parker Lougheed <parlough@gmail.com>
2025-11-01 18:38:27 +00:00
Jonathan Gilbert
7b1bafec82
Add support for Visual Studio 2026 (#177458)
Adds a mapping for Visual Studio 2026 to the `cmakeGenerator` property
used to drive Windows builds, enabling Flutter to be used for
development on a system with Visual Studio 2026 installed and not Visual
Studio 2022 or Visual Studio 2019.

Closes: #176399
Related-To: #93426

## 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-11-01 06:01:35 +00:00
Bruno Leroux
be736e19e7
Fix default value for DateRangePickerDialog currentDate (#177448)
## Description

This PR fixes the default value for `DateRangePickerDialog.currentDate`.
Before this PR, the comment mentions that `currentDate` defaults to
`DateTime.now()` but this is not the case (the value is not
initialised).
After this PR, `currentDate` defaults to `calendarDelegate.now()`.

## Related Issue

Fixes [DateRangePickerDialog crashes when currentDate is
omitted](https://github.com/flutter/flutter/issues/177441)

## Tests

- Adds 1 test
2025-10-31 22:16:21 +00:00
Bruno Leroux
46b6f40982
Fix ElevatedButton.icon breaks focus traversal and VoiceOver when toggling icon (#177579)
## Description

This PR changes `ElevatedButton.icon` to avoid building a different
widget. When a different widget is created the whole subtree is
recreated which leads to various issues (Focus and A11y issues for
instance).
The change is similar to https://github.com/flutter/flutter/pull/175810
which fixed the exact same problem for `OutlinedButton.icon`.

## Related Issue

[TextButton.icon breaks focus traversal and ink effect when toggling
icon](https://github.com/flutter/flutter/issues/173944)
[Voiceover focus traversal breaks if a button's state changes to include
an icon](https://github.com/flutter/flutter/pull/175810)

## Tests

- Adds 2 tests
2025-10-31 15:01:19 +00:00
Bruno Leroux
46733c69fb
Fix FilledButton.icon and FilledButton.tonalIcon break focus traversal and VoiceOver (#177593)
## Description

This PR changes `FilledButton.icon` and `FilledButton.tonalIcon` to
avoid building a different widget. When a different widget is created
the whole subtree is recreated which leads to various issues (Focus and
A11y issues for instance).
The change is similar to https://github.com/flutter/flutter/pull/175810
which fixed the exact same problem for `OutlinedButton.icon`.

## Related Issue

[TextButton.icon breaks focus traversal and ink effect when toggling
icon](https://github.com/flutter/flutter/issues/173944)
[Voiceover focus traversal breaks if a button's state changes to include
an icon](https://github.com/flutter/flutter/pull/175810)

## Tests

- Adds 4 tests
2025-10-31 13:06:24 +00:00
chunhtai
c914ec90f1
Adds cache extent type to two_dimentional_viewport (#177411)
<!--
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
-->

as title. this is needed if we want to change cache extent default to
use viewport % instead of pixels

## 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-30 21:39:07 +00:00
Lewin Pauli
1ac41be367
Added computeDryBaseline implementation in RenderAligningShiftedBox (#171250)
<!--
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
-->

Implements computeDryBaseline method in RenderAligningShiftedBox to fix
layout failures when DropdownButtonFormField is used inside Wrap inside
AlertDialog. The method calculates baseline using dry layout methods and
accounts for child positioning within the parent's coordinate space.

Issue appeared when DropdownButtonFormField was used inside a Wrap
inside Alertdialog

Fixes
[flutter/flutter/issues/169214](https://github.com/flutter/flutter/issues/169214)


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

<!-- 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-30 00:06:20 +00:00
Qun Cheng
ccf6466b14
Refactor OverlayPortal semantics (#173005)
Fixes https://github.com/flutter/flutter/issues/163576
Fixes https://github.com/flutter/flutter/issues/175184

This PR refactored the grafting part on `OverlayPortal`. Originally, the
semantics tree of `OverlayPortal` was constructed/grafted in render
object phase to make sure the correctness of the traversal order.
However this resulted wrong hit-test order and the issue surfaced on
web. With the fact that on web we are not able to graft/correct hit-test
order tree, this PR:
* Reverts the original grafting of the `OverlayPortal` so the hit-test
order is always correct.
* Then, we adds the grafting and updates the traversal order when we
send `childrenInTraversalOrder` to engine.
* Updating `childrenInTraversalOrder` causes it have different length
from the length of `childrenInHitTestOrder` and wrong hit-test transform
of the `OverlayPortal` children because when the transform is
calculated, it assumes a correct traversal order. To fix these issues,
this PR also:
  * recalculates the transform for `OverlayPortal` children.
  * adds `hitTestTransform` property and pass it to Android engine.
* skip grafting for web because it assumes the same length of
`childrenInTraversalOrder` and `childrenInHitTestOrder`.
* added grafting by using `ARIA-owns` in web engine to fix the traversal
order.

## 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-29 22:30:39 +00:00
Mouad Debbar
c065595842
[web] Deprecate --pwa-strategy (#177613)
- Hide the `--pwa-strategy` flag.
- Add deprecation note to the help text.
- Print deprecation warning if passed explicitly.

Towards https://github.com/flutter/flutter/issues/156910
2025-10-29 14:45:36 +00:00