Valentin Vignal
d305a32ad9
Migrate to widget state ( #174746 )
...
Follow up of https://github.com/flutter/flutter/pull/174486
Migrate some files from `MaterialState` to `WidgetState`. This PR only
focus on `WidgetState` for a subset of files.
- 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-09-11 14:40:28 +00:00
Bruno Leroux
6ae27959de
Fix DropdownMenuFormField does not clear text field content on reset … ( #174937 )
...
## Description
This PR fixes `DropdownMenuFormField` not clearing the text field value
when the form is reset and DropdownMenuFormField.initialSelection is
null.
## Related Issue
Fixes [DropdownMenuFormField does not reset when calling
FormState.reset](https://github.com/flutter/flutter/issues/174578 )
## Tests
Adds 2 tests.
2025-09-08 12:09:10 +00:00
Bruno Leroux
c1ce4e530c
Fix IconButton.color overrided by IconButtomTheme ( #174515 )
...
## Description
This PR fixes IconButton icon color resolution.
## Before
The IconButton.color property does not take precedence over the ambient
`IconButtonTheme`
## After
The IconButton.color property overrides the ambient `IconButtonTheme`.
## Related Issue
Fixes [SnackBar closeIconColor does not respect widget
override](https://github.com/flutter/flutter/issues/174472 )
Fixes [IconButton.color is overidden by
IconButtonTheme](https://github.com/flutter/flutter/issues/174511 )
## Tests
Adds 1 test.
2025-09-04 22:17:25 +00:00
Hannah Jin
5a89802d6d
Fix table cell semantics rect alignment issues. ( #174914 )
...
fix: https://github.com/flutter/flutter/issues/171264
should use cell rect bottom to compare with row height instead of using
cell rect top.
## 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-09-04 20:20:44 +00:00
Bruno Leroux
6e9286d6eb
Fix expanded DropdownMenu panel is shorter than text field ( #174443 )
...
## Description
This PR fixes DropdownMenu menu panel being shorter than the TextField
when it expands to full-screen width.
## Before
The menu panel is shorter than the text field:
<img width="297" height="130" alt="image"
src="https://github.com/user-attachments/assets/db42bd01-94d8-47fb-9331-ebd78111b931 "
/>
## After
The menu panel expands as close as possible to the edge similarly to the
text field.
<img width="297" height="130" alt="image"
src="https://github.com/user-attachments/assets/b7d8f2aa-a668-439a-8195-9b9ce48dba6b "
/>
## Code sample
<details><summary>Code sample for recordings</summary>
```dart
import 'package:flutter/material.dart';
void main() {
runApp(const DropdownMenuExample());
}
class DropdownMenuExample extends StatefulWidget {
const DropdownMenuExample({super.key});
@override
State<DropdownMenuExample> createState() => _DropdownMenuExampleState();
}
class _DropdownMenuExampleState extends State<DropdownMenuExample> {
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: DropdownMenu<int>(
expandedInsets: EdgeInsets.zero,
dropdownMenuEntries: <DropdownMenuEntry<int>>[
DropdownMenuEntry<int>(value: 0, label: 'Flutter'),
],
),
),
);
}
}
```
</details>
## Implementation details
MenuAnchor automatically adds a default padding, see
2c21273bfd/packages/flutter/lib/src/material/menu_anchor.dart (L81-L82)
This PR add a property to menu anchor to expose the view padding.
DropdownMenu sets this padding to EdgeInsets.zero to opt-out from the
default 8 padding.
## Related Issue
Fixes [DropdownMenu children is shorter than the TextField when it
expands to full-screen
width](https://github.com/flutter/flutter/issues/172680 )
## Tests
Adds 2 tests.
---------
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2025-09-04 06:35:20 +00:00
Ahmed Mohamed Sameh
ff1aafde34
Make sure that a DropdownMenuFormField doesn't crash in 0x0 environment ( #174777 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
DropdownMenuFormField widget.
2025-09-03 21:53:22 +00:00
Victor Sanni
0a2f905b1c
[A11y] Add semantics for CupertinoExpansionTile ( #174480 )
...
Fixes [Add semantics for
CupertinoExpansionTile](https://github.com/flutter/flutter/issues/173446 )
2025-09-03 18:49:07 +00:00
Kostia Sokolovskyi
52d5c5dc93
Fix LinearProgressIndicator track painting. ( #173108 )
...
Fixes https://github.com/flutter/flutter/issues/164538
Fixes https://github.com/flutter/flutter/issues/173096
Fixes https://github.com/flutter/flutter/issues/173153
### Description
- Adds support for `trackGap` in indeterminate `LinearProgressIndicator`
- Fixes track painting outside of `LinearProgressIndicator` bounds when
`trackGap` is greater than zero
- Fixes `LinearProgressIndicator` track gap painting when `value` is 0
- Adds golden tests
_Compose `ProgressIndicator`
[implementation](https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-main/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/ProgressIndicator.kt )
was used as a reference._
<table>
<thead>
<tr>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<td colspan="2" align="center">Determinate (regular)</code></td>
</tr>
<tr>
<td><img width="750" height="510" alt="before"
src="https://github.com/user-attachments/assets/e68d34b4-b459-4c99-ad9f-877fcb3cb168 "
/></td>
<td><img width="750" height="510" alt="after"
src="https://github.com/user-attachments/assets/0fbb5fe1-8b45-47c1-ade4-179b4da21be1 "
/></td>
</tr>
<td colspan="2" align="center">Determinate (<code>trackGap:
20</code>)</td>
<tr>
<td><img width="750" height="510" alt="before"
src="https://github.com/user-attachments/assets/a6442b24-cbd0-4b6b-aa21-d5a13137e109 "
/></td>
<td><img width="750" height="510" alt="after"
src="https://github.com/user-attachments/assets/9f8228ff-3a8b-42f7-aada-fd29cc950082 "
/></td>
</tr>
<tr>
<td colspan="2" align="center">Indeterminate (regular)</code></td>
</tr>
<tr>
<td><img width="750" height="510" alt="before"
src="https://github.com/user-attachments/assets/b417e438-fd91-409c-85bc-f34e2adcd753 "
/></td>
<td><img width="750" height="510" alt="after"
src="https://github.com/user-attachments/assets/2a4865e2-c7d9-43a6-bd25-39012e5be389 "
/></td>
</tr>
<tr>
<td colspan="2" align="center">Indeterminate (<code>trackGap:
20</code>)</td>
</tr>
<tr>
<td><img width="750" height="510" alt="before"
src="https://github.com/user-attachments/assets/b94c6f41-94e2-4b6e-9c9b-5ec3486a77a8 "
/></td>
<td><img width="750" height="510" alt="after"
src="https://github.com/user-attachments/assets/396c3386-8d42-4b82-a890-f21d6897cbdb "
/></td>
</tr>
</tbody>
</table>
## 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].
<!-- 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-09-03 18:25:58 +00:00
Ahmed Mohamed Sameh
6e4b1fe407
Handle#6537 date picker dialog ( #174359 )
...
Apply
https://github.com/flutter/flutter/issues/6537#issuecomment-3216557050
2025-08-29 21:31:06 +00:00
Ahmed Mohamed Sameh
0fe60b15a2
Make sure that a Dialog doesn't crash in 0x0 environment ( #174023 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Dialog UI
control.
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-08-29 21:27:09 +00:00
Kostia Sokolovskyi
03e9fe3357
Fix empty adaptive text selection toolbars building. ( #174656 )
...
Fixes https://github.com/flutter/flutter/issues/174649
This PR fixes `AdaptiveTextSelectionToolbar` and
`CupertinoAdaptiveTextSelectionToolbar` building when `children` and
`buttonItems` are both `null`.
## 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-08-29 05:17:06 +00:00
chunhtai
ebca75b86c
Adds semantics for disabled buttons in date picker ( #174064 )
...
<!--
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 https://github.com/flutter/flutter/issues/172988
fixes https://github.com/flutter/flutter/issues/173870
## 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-08-29 01:08:44 +00:00
Ahmed Mohamed Sameh
d0261ea6f7
Make sure that an AlertDialog doesn't crash in 0x0 environment ( #174091 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the AlertDialog UI
control.
2025-08-28 20:34:52 +00:00
Roman Jaquez
81bf567ca2
Drawer barrier non dismissible with the escape key ( #173263 )
...
<!--
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
-->
Additional fix for the 'drawerBarrierDismissible' feature in which the
ESC key can close the drawer even if the flag is set to false.
## 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: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Justin McCandless <justinjmccandless@gmail.com>
2025-08-27 19:12:20 +00:00
Qun Cheng
264223d987
SnackBar with action no longer auto-dismiss ( #173084 )
...
Fixes https://github.com/flutter/flutter/issues/173000
This PR updated the default behavior for Snackbar with action:
* SnackBars no longer auto-dismiss if SnackBar.action is not null.
* To override the default behavior, this PR added a property `persist`
for `SnackBar`.
## 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-08-27 01:33:30 +00:00
Kishan Rathore
42ba7a1f4d
Fix: Active step fully colored in vertical mode ( #173152 )
...
Fix: Active step fully colored in vertical mode
fixes : #169661
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2025-08-26 03:07:13 +00:00
Valentin Vignal
04f274a7a5
Migrate to use WidgetStateProperty ( #174323 )
...
Follow up of https://github.com/flutter/flutter/pull/174268
Final PR to migrate the usages of `MaterialStateProperty` to
`WidgetStateProperty`
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 `///`).
- [ ] 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-08-26 03:07:13 +00:00
Hannah Jin
798ff5908e
Update some semantics flags updated to use enum (engine, framework, web) ( #170696 )
...
issue: https://github.com/flutter/flutter/issues/166101 ,
new Updates :
Add new enum Tristate and CheckedState in for 7 flags.
For CheckState, it used to use 3 bools (hasCheck, isChecked,
isCheckStateMixed) to represent check states, replace them with a
CheckState enum.
For other 6 flags, each has 2 bools (hasXXState and isXX), replace them
with a Tristate enum.
This will be a breaking changes to the SemanticsFlags class , which was
added in April in https://github.com/flutter/flutter/issues/166101 and
https://github.com/flutter/flutter/pull/167771 , will write a breaking
change doc for this PR
## 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
2025-08-22 22:38:17 +00:00
Valentin Vignal
f0f208deae
Migrate more files to WidgetStateProperty ( #174268 )
...
Another batch of files migrated to use WidgetStateProperty
Follow up of https://github.com/flutter/flutter/pull/174176
## 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 `///`).
- [ ] 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-08-22 17:23:53 +00:00
Ahmed Mohamed Sameh
edc8a52e80
Make sure that an Autocomplete doesn't crash in 0x0 environment ( #172732 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Autocomplete UI
control.
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-08-20 20:58:35 +00:00
PurplePolyhedron
c39c1b1738
Fix onSelect called twice in DropdownMenuFormField ( #174053 )
...
Fixes https://github.com/flutter/flutter/issues/173977
Currently `onSelect` isn't called twice during reset, but I still added
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
2025-08-20 20:54:34 +00:00
Ahmed Mohamed Sameh
0c127ecbbc
Make sure that a Badge doesn't crash in 0x0 environment ( #172065 )
...
This is my attempt to handle #6537 for the Badge UI control.
---------
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-08-20 19:40:40 +00:00
Ahmed Mohamed Sameh
e316ed8f9e
Make sure that CalendarDatePicker & YearPicker don't crash in 0x0 environment ( #173408 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
CalendarDatePicker & YearPicker UI controls.
---------
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-08-20 19:19:25 +00:00
Ahmed Mohamed Sameh
559da1fd76
Make sure that a CircleAvatar doesn't crash in 0x0 environment ( #173498 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the CircleAvatar UI
control.
2025-08-20 18:42:39 +00:00
Ahmed Mohamed Sameh
1066f5f9a9
Make sure that a BackButton doesn't crash in 0x0 environment ( #172817 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the BackButton UI
control.
2025-08-20 18:05:17 +00:00
ShantanuBorkar
7438e54915
feat: Added FocusNode prop for DropdownMenu Trailing Icon Button ( #172753 )
...
<!--
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 an API to control the FocusNode of DropdownMenu Trailing
IconButton.
This is also an improvement to [DropdownMenu
Focus](https://github.com/flutter/flutter/pull/156412/ ) since
introducing the FocusNode to IconButton brings uniformity to the Focus
Traversal.
Previously there were two cases
- If FocusNode is passed to DropdownMenu, 3 ```tab``` presses were
required to focus the Trailing IconButton
- If FocusNode is not passed then 3 ```tab``` presses were needed for
MacOS, Windows & Linux Platforms and 2 for Android, iOS & Fuchsia.
This PR allows Focusing the IconButton by single ```tab``` press
Fixes #172687 by passing a FocusNode with ```skipTraversal:true```
### Before
- MacOS
-
https://github.com/user-attachments/assets/d2f6f3dd-e37c-4293-8c0e-6b73650a830b
- IOS without a FocusNode
-
https://github.com/user-attachments/assets/4a03bb98-faac-44b6-809d-9887941972c3
- IOS with a FocusNode
-
https://github.com/user-attachments/assets/9f0f5e0d-6f20-4d21-af9b-52e3cb0014e5
### After
- MacOS
-
https://github.com/user-attachments/assets/6d9d77be-760c-43f3-b23e-cef0dbdc3f47
- IOS without FocusNode
-
https://github.com/user-attachments/assets/2146dd72-9464-4af4-932d-f88463e6012c
- IOS with a FocusNode
-
https://github.com/user-attachments/assets/035ce567-838d-4ed8-943c-5b508c1fd09f
## 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].
<!-- 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-08-20 09:24:09 +00:00
Huy
00d9b6f857
Fix Menu anchor reduce padding on web and desktop ( #172691 )
...
- Fix https://github.com/flutter/flutter/issues/171608
- Demo before the fix:
| desktop | web |
| --------------- | --------------- |
<img width="400"
src="https://github.com/user-attachments/assets/1abd3962-14bb-497c-9bea-f0ff847e2dd6 ">
| <img width="400"
src="https://github.com/user-attachments/assets/783d96b4-b93f-4b26-8cc7-abdbcf362992 ">
- Demo after the fix:
| desktop | web |
| --------------- | --------------- |
<img width="400"
src="https://github.com/user-attachments/assets/8a7442b9-77e6-477e-afd9-82a304fadcba ">
| <img width="400"
src="https://github.com/user-attachments/assets/029ccecf-3cf6-40b3-9233-7eb3d7a88eda ">
- Description: On desktop/web platforms, VisualDensity.compact is
applied by default, which caused the issue as reported.
Previously, this compressed menus vertically.
In this PR:
- Vertical padding affected by visual density is removed to follow
[Material Design
specs](https://www.figma.com/community/file/1035203688168086460 ) so that
visual density should not affect vertical menu padding anymore. (*)
- Some of test values (y coordinate/height) are also updated to align
with this change and also add a regression test
- Enhance `MenuAnchor` documentation to prevent user confusion.
<details open>
<summary>(*) Material Design specs inspection from Figma</summary>
https://github.com/user-attachments/assets/3e348a51-3917-4217-ad66-ef8cdff256ba
</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].
<!-- 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: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-08-20 07:20:22 +00:00
Bruno Leroux
c4b5b410c6
Fix time picker period selector a11y touch targets ( #170060 )
...
## Description
This PR fixes the TimePicker day period selector touch targets.
### Before
| Flutter | Google Agenda | Compose |
|--------|--------|--------|
|

|

|


|
### After
| Flutter | Google Agenda | Compose |
|--------|--------|--------|
|
|

|


|
## Implementation choice
This PR implements two main changes:
- it expands the `_DayPeriodControl` bounds by reducing some existing
spacing. Doing so the touch area of the AM/PM buttons can grow outside
the day period container and respect the minimum interactive height.
- it changes the tree order to correctly sized the AM/PM buttons
semantics. The solution here is somewhat tricky/hacky:
Because the semantics bounds are clipped by their ancestor, the PR
changes the widget order:
Before, the order was `_DayPeriodControl` > `_DayPeriodInputPadding` >
`Material` (with shape and clip) > `Row` (or Column depending on the
orientation) > children [ `Semantics` > AM `InkWell`, `Semantics` > PM
`InkWell` ]
(Which leads to the Semantics being clipped by the Material shape).
After, the order is `_DayPeriodControl` > `_DayPeriodInputPadding` >
`Row` (or Column depending on the orientation) > children [ `Semantics`
> `Material` (with shape and clip) > AM `InkWell`, `Semantics` >
`Material` (with shape and clip) > PM `InkWell` ]
The difficulty here is that the `TimePickerThemeData.dayPeriodShape` is
meant to be the shape for the whole day period container. In order to
change the order, this PR has to set separetly the shapes of the AM and
PM buttons. To do so it adds some logic to 'split' the shape in two
parts. This is ok for the default shape but not possible for any shape,
in that case the original shape will be use for both buttons which gives
a different result than before this PR. This annoyance seems less a
problem than having the default rendering not respecting a11y touch
targets.
## Related Issue
Fixes [touch target size not up to a11y standards for DatePicker day
period selector.](https://github.com/flutter/flutter/issues/168245 )
## Tests
Adds 2 tests.
Updates 5 tests.
2025-08-20 06:12:09 +00:00
Bruno Leroux
9d4db1d5dd
Fix SegmentedButton focus issue ( #173953 )
...
## Description
This PR fixes SegmentedButton focus traversal.
# Before
When a focused segment (with no icon) is selected or unselected, the
focus moves to another segment.
[Capture vidéo du 2025-08-11
15-28-03.webm](https://github.com/user-attachments/assets/11c29194-6b96-4ea4-9245-dcbd36dc424f )
In this recording, tab key is used to set the focus on 'Month' segment,
then enter is used to select the segment. The focus move unexpectedly to
'Week' segment.
# After
When a focused segment (with no icon) is selected or unselected, the
focus stays on this same segment and the InkWell animations are
correctly painted.
[Capture vidéo du 2025-08-11
15-27-30.webm](https://github.com/user-attachments/assets/e09056d0-b572-462b-8ad8-c23eddcc4bfd )
<details><summary>Code sample for recordings</summary>
```dart
import 'package:flutter/material.dart';
/// Flutter code sample for [SegmentedButton].
void main() {
runApp(const SegmentedButtonApp());
}
class SegmentedButtonApp extends StatelessWidget {
const SegmentedButtonApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(body: Center(child: SingleChoice())),
);
}
}
enum Calendar { day, week, month, year }
class SingleChoice extends StatefulWidget {
const SingleChoice({super.key});
@override
State<SingleChoice> createState() => _SingleChoiceState();
}
class _SingleChoiceState extends State<SingleChoice> {
Calendar calendarView = Calendar.day;
@override
Widget build(BuildContext context) {
return SegmentedButton<Calendar>(
segments: const <ButtonSegment<Calendar>>[
ButtonSegment<Calendar>(value: Calendar.day, label: Text('Day')),
ButtonSegment<Calendar>(value: Calendar.week, label: Text('Week')),
ButtonSegment<Calendar>(value: Calendar.month, label: Text('Month')),
ButtonSegment<Calendar>(value: Calendar.year, label: Text('Year')),
],
selected: <Calendar>{calendarView},
onSelectionChanged: (Set<Calendar> newSelection) {
setState(() {
// By default there is only a single segment that can be
// selected at one time, so its value is always the first
// item in the selected set.
calendarView = newSelection.first;
});
},
);
}
}
```
</details>
## Related Issue
Fixes [SegmentedButton keyboard navigation incorrectly moves focus on
click](https://github.com/flutter/flutter/issues/161922 )
## Implementation choice
The root of this issue is TextButton.icon which creates a different
widget tree depending on the icon.
See https://github.com/flutter/flutter/issues/173944 for more context.
The proposed solution is to maintain the same widget tree when possible.
To do TextButton.icon is not used. This PR uses on TextButton and build
a child containing both the icon (when present) and the label.
In order to keep the same rendering as before, some internal logic from
TextButton.icon is duplicated.
## Tests
Adds 1 test.
Updates 1 test.
2025-08-20 06:10:07 +00:00
Victor Sanni
4befa37166
NavigationRail correct traversal order ( #173891 )
...
Fix [[VPAT] [A11y] Navigation Rail has unexpected semantics traversal
order](https://github.com/flutter/flutter/issues/172992 )
2025-08-19 22:31:18 +00:00
Srivats Venkataraman
c07ba3f8b6
[VPAT][A11y] AutoComplete dropdown option is missing button role ( #173297 )
...
Fixes: https://github.com/flutter/flutter/issues/173058
This PR assigns a semantic role of a button to dropdown options.
When using optionsBuilder, it automatically gets the button semantics.
When the user defines: optionsViewBuilder, then it will use the default
semantics. This is based on how the current code behaves
## 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: chunhtai <47866232+chunhtai@users.noreply.github.com>
2025-08-19 17:38:08 +00:00
Justin McCandless
2c031ed023
Reland predictive back route transitions by default ( #173860 )
...
Relands https://github.com/flutter/flutter/pull/165832 by reverting
flutter/flutter#173809 .
2025-08-15 22:40:14 +00:00
lauraywu
e4f27cd097
Add onHover callback support for TableRowInkWell ( #173373 )
...
<!--
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
-->
- Add `onHover` parameter to `TableRowInkWell`
- Add corresponding tests
Issue: https://github.com/flutter/flutter/issues/173370
## 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-08-15 20:41:21 +00:00
auto-submit[bot]
0e57a627f5
Reverts "Predictive back route transitions by default ( #165832 )" ( #173809 )
...
<!-- start_original_pr_link -->
Reverts: flutter/flutter#165832
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Breaks `Linux_pixel_7pro
embedded_android_views_integration_test`:
-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8918/overview
-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8917/overview
```txt
[2025-08-14 16:01:17.600761] [STDOUT] stdout: [ +1 ms] Expecte
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: justinmc
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {QuncCccccc}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
This PR turns on predictive back route transitions by default on supported Android devices.
With https://github.com/flutter/flutter/pull/154718 , the default (PredictiveBackPageTransitionsBuilder) is the [shared element transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition ). The [full screen transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces ) is also available by using PredictiveBackFullScreenPageTransitionsBuilder.
Original PR: https://github.com/flutter/flutter/pull/146788
Depends on: https://github.com/flutter/flutter/pull/154718
When this lands in stable, the docs should be updated: https://docs.flutter.dev/platform-integration/android/predictive-back
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-08-14 23:38:48 +00:00
Ahmed Mohamed Sameh
667da94d3c
Make sure that DataTable, DataColumn, DataRow, and DataCell don't crash in 0x0 environment ( #173515 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the DataTable,
DataColumn, DataRow, and DataCell UI controls.
2025-08-14 21:19:01 +00:00
Ahmed Mohamed Sameh
87bac26665
Make sure that a TableRowInkWell doesn't crash in 0x0 environment ( #173627 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the TableRowInkWell
UI control.
2025-08-14 21:19:01 +00:00
Ahmed Mohamed Sameh
3c1e258864
Make sure that a DatePickerDialog doesn't crash in 0x0 environment ( #173677 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the DatePickerDialog
UI control.
2025-08-14 21:17:12 +00:00
Justin McCandless
d1e2019a94
Predictive back route transitions by default ( #165832 )
...
This PR turns on predictive back route transitions by default on
supported Android devices.
With https://github.com/flutter/flutter/pull/154718 , the default
(PredictiveBackPageTransitionsBuilder) is the [shared element
transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition ).
The [full screen
transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces )
is also available by using
PredictiveBackFullScreenPageTransitionsBuilder.
Original PR: https://github.com/flutter/flutter/pull/146788
Depends on: https://github.com/flutter/flutter/pull/154718
When this lands in stable, the docs should be updated:
https://docs.flutter.dev/platform-integration/android/predictive-back
2025-08-14 20:39:12 +00:00
Houssem Eddine Fadhli
8914c91428
feat: add onLongPressUp callback to InkWell widget ( #173221 )
...
This PR introduces a new optional callback, onLongPressUp, to the
InkWell widget.
It allows developers to respond specifically to the moment when a long
press gesture is released, which previously was not directly exposed.
**Before**
There was no way to distinguish between the long press being held and
the moment it ended.
**After**
InkWell now accepts an onLongPressUp callback, which fires when the user
lifts their finger after a long press gesture.
This change enhances gesture handling granularity for widgets that
require different behaviors for long press hold and release.
**Related Issue**
#173390
**Tests**
- Added a new test to ink_well_test.dart verifying that onLongPressUp is
correctly triggered after a long press is released.
**Checklist**
- I read the [Contributor Guide] and followed the process outlined there
for submitting PRs.
- I read the [Tree Hygiene] wiki page.
- I followed the [Flutter Style Guide].
- I signed the [CLA].
- I updated/added relevant documentation (/// doc comments).
- I added new tests to check the change I am making.
- All existing and new tests are passing.
---------
Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
Co-authored-by: engine-flutter-autoroll <engine-flutter-autoroll@skia.org>
Co-authored-by: Reid Baker <1063596+reidbaker@users.noreply.github.com>
Co-authored-by: Jon Ihlas <jon.i@hotmail.fr>
Co-authored-by: Matthew Kosarek <matt.kosarek@canonical.com>
Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
Co-authored-by: Micael Cid <micaelcid10@gmail.com>
Co-authored-by: Alexander Aprelev <aam@google.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-08-14 20:31:02 +00:00
LongCatIsLooong
2fcda04790
Add error handling for Element lifecycle user callbacks ( #173148 )
...
This is for #172289 , but since this fix is speculative so I'll wait for
the confirmation from the original reporters before closing the issue.
As a bonus this fixes #65655
The framework Element rebuild logic relies heavily on
`Element._lifecycleState` being correct. When a user-supplied lifecycle
callback (e.g., `State.deactivate`) fails the framework currently only
ensures that every `Element` in the tree has the right lifecycle state,
so an out-of-tree `Element` that is supposed to be disposed may still
have an `active` state and continue being rebuilt by the BuildScope
(because it's in the dirty list). See the comments in #172289
Also related:
#100777
Internal:
b/425298525 b/431537277
b/300829376 b/415724119 b/283614822
# TODO (in a different PR)
The original issue could also be caused by incorrect
`Element.updateChild` calls. If an `Element` subclass calls
`Element.updateChild` to add child but forgets to update its child list
accordingly (such that `visitChildren` misses that child), you'll get a
child Element that thinks it's a child of the parent but the parent
doesn't recognize the child so won't take that child into account during
reparenting or unmounting. This is a programmer error that we should try
to catch in the framework.
## 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-08-14 19:53:20 +00:00
Hannah Jin
450401dfec
[Range slider] Tap on active range, the thumb closest to the mouse cursor should move to the cursor position. ( #173725 )
...
Fix: https://github.com/flutter/flutter/issues/172923
Internal issue: b/434778923
## 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-08-14 18:27:51 +00:00
Bruno Leroux
ee3551fbe4
Fix InputDecorator label padding ( #173344 )
...
## Description
This PR fixes the label padding for an InputDecorator with prefixIcon
and/or suffixIcon.
# Before
The label was shorter than the available space because
`InputDecoration.contentPadding.horizontal` was applied even when
`prefixIcon` and `suffixIcon` were defined. The icons width replaces the
corresponding `contentPadding`, so both should not be used at the same
time to compute the available space.
<img width="269" height="61" alt="image"
src="https://github.com/user-attachments/assets/e1433ffb-8f17-46fe-9a65-6b9a504ef043 "
/>
# After
The label takes all the available space.
<img width="269" height="61" alt="image"
src="https://github.com/user-attachments/assets/12e8d087-c75b-48c9-8df4-1b11207c0e73 "
/>
## Related Issue
Fixes [Label padding is wrong for InputDecorator with prefixIcon and/or
suffixIcon ](https://github.com/flutter/flutter/issues/173341 )
## Tests
Adds 1 test.
2025-08-14 17:38:02 +00:00
EdwynZN
e2c7311956
Fix default minimumSize in dropdownMenu when maximumSize is null ( #169438 )
...
<!--
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
-->
Previous change in `DropDownMenu`
https://github.com/flutter/flutter/pull/162380 forced the menu width to
be constrained between the width or anchorWidth and the maximumSize
width menuStyle, but giving a minimum of zero when maximumSize was not
enforced or null. This prevents width or anchorWidth to be used at all
as the minimum will be zero always if maximumSize is null
Now this sets the default value back to width or anchorWidth if
maximumSize is null, keeping consistency of the previous configuration
while using the fix of maximumSize when provided.
Fixes https://github.com/flutter/flutter/issues/170970
## 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].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
---------
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2025-08-14 17:36:09 +00:00
Azat Chorekliyev
e1eb1a67dd
Allow empty initial time when using text input mode in showTimePicker dialog ( #172847 )
...
Added ability to allow empty initial time when using text input mode in
showTimePicker dialog https://github.com/flutter/flutter/issues/169131
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
---------
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-08-14 00:10:11 +00:00
Ahmed Mohamed Sameh
72e1bf1a15
Make sure that a ChoiceChip doesn't crash in 0x0 environment ( #173322 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the ChoiceChip UI
control.
2025-08-13 23:53:03 +00:00
Albin PK
90a892293c
fix: selected date decorator renders outside PageView in DatePickerDialog dialog ( #171718 )
...
Wraps `PageView` with a transparent `Material` to ensure the selected
date decorator is painted in the correct context, avoiding visual
glitches during transitions.
Fixes #171717
## 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.
---------
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Huy <huy@nevercode.io>
2025-08-13 19:12:53 +00:00
Ahmed Mohamed Sameh
9e99953a4e
Make sure that a Chip doesn't crash in 0x0 environment ( #173245 )
...
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Chip UI control.
2025-08-13 19:08:49 +00:00
TheLastFlame
61a4d24da5
Fix visual overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder ( #167032 )
...
Reopens https://github.com/flutter/flutter/pull/165726 with the removed
test that has become irrelevant.
Depends on: https://github.com/flutter/flutter/pull/167324
Actual master:
https://github.com/user-attachments/assets/28619355-9c1e-4f06-9ede-38c4dddd13df
After fix:
https://github.com/user-attachments/assets/a5f2ecf2-5d8e-445a-b5a9-a7d6c0e3ec5d
## 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.
---------
Co-authored-by: Justin McCandless <jmccandless@google.com>
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2025-08-13 19:07:29 +00:00
Valentin Vignal
dd7b2130a1
Fix ChipThemeData lerp for BorderSide ( #173160 )
...
In https://github.com/flutter/flutter/pull/171945#discussion_r2245715705
we realised that some `lerp` method for `BorderSide` had a bug.
This PR
- Fixes a wrong interpolation of `ChipThemeData.lerp` for `side` in the
case of `b` being `null`
- Do some cleaning of other `lerp` of `BorderSide?`
Fixes https://github.com/flutter/flutter/issues/173161
## 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-08-13 19:06:00 +00:00
Valentin Vignal
705c3d6b71
Update ExpansibleController in ExpansionTile didUpdateWidget ( #173175 )
...
Fixes https://github.com/flutter/flutter/issues/138916
## 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-08-11 15:27:56 +00:00