85601 Commits

Author SHA1 Message Date
Ben Konyi
16c388f425 [ Tool ] Set VM_SERVICE_URL to the VM service URL for web driver tests
Fixes https://github.com/flutter/flutter/issues/172220
2025-08-20 17:26:09 -04:00
auto-submit[bot]
960d1078f8
Reverts "Reapply "Add set semantics enabled API and wire iOS a11y bridge (#161… (#171198)" (#174153)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#171198
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: chunhtai
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: breaking internal tests
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: chunhtai
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jmagman, mdebbar}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
…265)"

This reverts commit cc04ca4e5594fe9cd87adde34a5eedf14221fc3b.

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

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

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-08-20 19:43:47 +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
engine-flutter-autoroll
cc0c9b0a55
Roll Packages from 953cae031cb7 to 58c02e056b92 (2 revisions) (#174142)
953cae031c...58c02e056b

2025-08-19 lukas.mirbt@hotmail.com [go_router_builder]: Add support for
relative routes (flutter/packages#9749)
2025-08-19 engine-flutter-autoroll@skia.org Roll Flutter from
2265d94c6b0b to e65380a22076 (8 revisions) (flutter/packages#9850)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-20 19:04: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
engine-flutter-autoroll
b152cedae7
Roll Dart SDK from 0d674ff61e2e to 0d0a0c394381 (1 revision) (#174126)
https://dart.googlesource.com/sdk.git/+log/0d674ff61e2e..0d0a0c394381

2025-08-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-118.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter
Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-20 18:38:54 +00:00
Gray Mackall
444ccb5a3b
[Android] Fix version code override calculation in FlutterPlugin (#174081)
Fixes https://github.com/flutter/flutter/issues/173917. Also modifies
the test harness to use a newly created app instead of the hello world
example, and adds a test case for when a custom gradle file trying to
modify the version code is being used.

## 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: Gray Mackall <mackall@google.com>
2025-08-20 18:27:03 +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
engine-flutter-autoroll
07bbaf0735
Roll Dart SDK from c5f5a32df36c to 0d674ff61e2e (1 revision) (#174099)
https://dart.googlesource.com/sdk.git/+log/c5f5a32df36c..0d674ff61e2e

2025-08-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-117.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter
Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-20 10:08:44 +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
Valentin Vignal
e90bd4661d
Make component theme data defaults use WidgetStateProperty (#173893)
Coming from the comments in
https://github.com/flutter/flutter/pull/173160#discussion_r2252303786

`MaterialStateProperty` is deprecated. This PR remplaces its usage with
`WidgetStateProperty` for the files that generates component theme data
defaults

## 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-08-20 07:38:22 +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
engine-flutter-autoroll
52a4d54f40
Roll Skia from 4b788d0e5e63 to 721e68fe652a (2 revisions) (#174095)
https://skia.googlesource.com/skia.git/+log/4b788d0e5e63..721e68fe652a

2025-08-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn
from bfb0f1fba4a0 to 555275f0c242 (9 revisions)
2025-08-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
vulkan-deps from 6ab6cf8994f3 to 607fb6b15ab2 (6 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC fmalita@google.com,jimgraham@google.com,kjlubick@google.com on
the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-20 07:04:28 +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 |
|--------|--------|--------|
|
![Image](https://github.com/user-attachments/assets/9395a032-0e5c-4255-8620-e2c499bfed44)
|
![Image](https://github.com/user-attachments/assets/5a63b78c-45d2-4958-9088-5bc89c02c7fe)
|
![Image](https://github.com/user-attachments/assets/0b2ac630-9b8d-44ed-936f-297bd2798981)
![Image](https://github.com/user-attachments/assets/f4750ded-fc4b-4d86-8825-f4e9b38b6231)
|

### After

| Flutter | Google Agenda | Compose |
|--------|--------|--------|

|![image](https://github.com/user-attachments/assets/fde7d655-6151-42d8-a162-fe410e2278da)
|
![Image](https://github.com/user-attachments/assets/5a63b78c-45d2-4958-9088-5bc89c02c7fe)
|
![Image](https://github.com/user-attachments/assets/0b2ac630-9b8d-44ed-936f-297bd2798981)
![Image](https://github.com/user-attachments/assets/f4750ded-fc4b-4d86-8825-f4e9b38b6231)
|

## 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
engine-flutter-autoroll
fe65b1b90a
Roll Dart SDK from e936404543f1 to c5f5a32df36c (1 revision) (#174089)
https://dart.googlesource.com/sdk.git/+log/e936404543f1..c5f5a32df36c

2025-08-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-116.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter
Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-20 05:01:33 +00:00
engine-flutter-autoroll
d61f45178f
Roll Skia from 953bfc0e2f2a to 4b788d0e5e63 (1 revision) (#174086)
https://skia.googlesource.com/skia.git/+log/953bfc0e2f2a..4b788d0e5e63

2025-08-20
recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com
Roll recipe dependencies (trivial).

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC fmalita@google.com,jimgraham@google.com,kjlubick@google.com on
the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-20 02:42:38 +00:00
engine-flutter-autoroll
9ac4facf7e
Roll Skia from 07d71ea4d056 to 953bfc0e2f2a (18 revisions) (#174072)
https://skia.googlesource.com/skia.git/+log/07d71ea4d056..953bfc0e2f2a

2025-08-19 mike@reedtribe.org Tweak to new pathiter to better match prev
behavior
2025-08-19 jreck@google.com Fix crash in DNG 1.7.1
2025-08-19 robertphillips@google.com [graphite] Add plumbing for
ContextOptions::fExecutor
2025-08-19 drott@chromium.org Fix FontConfig font matching with
Fontations generated cache
2025-08-19 syoussefi@google.com [graphite][vulkan] Dedicated uint32 for
usage flags in texture key
2025-08-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
vulkan-deps from b7103d8dde12 to 6ab6cf8994f3 (2 revisions)
2025-08-19 briansalomon@gmail.com Add simd/arm to includes for
cc_library libjpeg_turbo
2025-08-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE
from 4c834956bdac to ff95cc93afac (15 revisions)
2025-08-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn
from 2c53c1b75e06 to bfb0f1fba4a0 (20 revisions)
2025-08-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
SwiftShader from fed7f25ca957 to a1b94a283161 (1 revision)
2025-08-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
vulkan-deps from a82edf807749 to b7103d8dde12 (8 revisions)
2025-08-18
recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com
Roll recipe dependencies (trivial).
2025-08-18 bungeman@google.com Better font style for variable fonts
2025-08-18 fmalita@google.com Manual roll skcms from 3eb7168d199c to
238fd0489c04
2025-08-18 jreck@google.com Add explicit float -> bool cast
2025-08-18 mike@reedtribe.org Revert to older iter as we explore perf
2025-08-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
vulkan-deps from eb3190110845 to a82edf807749 (2 revisions)
2025-08-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE
from 806c80ece32b to 4c834956bdac (1 revision)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC fmalita@google.com,jimgraham@google.com,kjlubick@google.com on
the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-19 23:42:28 +00:00
engine-flutter-autoroll
9b73217bfe
Roll Dart SDK from 9105d946af95 to e936404543f1 (5 revisions) (#174074)
https://dart.googlesource.com/sdk.git/+log/9105d946af95..e936404543f1

2025-08-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-115.0.dev
2025-08-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-114.0.dev
2025-08-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-113.0.dev
2025-08-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-112.0.dev
2025-08-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-111.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter
Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-19 22:49:11 +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
Victor Sanni
a51141a36d
Update CupertinoSliverNavigationBar.middle (#173868)
Fixes [CupertinoSliverNavigationBar middle widget does not update/react
when its value
changes](https://github.com/flutter/flutter/issues/173855)
2025-08-19 22:31:17 +00:00
Matthew Kosarek
e131243b00
Update the AccessibilityPlugin::Announce method to account for the view (#172669)
## What's new?
- The accessibility "announce" method now takes a `view_id`
- The `view_id` is used to lookup the corresponding `FlutterView` in the
win32 embedder
- Updated the associated tests

## 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: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2025-08-19 22:17:42 +00:00
Ben Konyi
796fb74325
[ Widget Preview ] Report an error if a web device is unavailable (#174036)
Fixes https://github.com/flutter/flutter/issues/173960

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-19 21:57:25 +00:00
Mouad Debbar
8df5257785
[web] Fix error in ClickDebouncer when using VoiceOver (#174046)
When using VoiceOver, clicking the button through `ctrl+opt+space`
causes the browser to send `pointerdown`, `pointerup` and `click` events
successively within the same event loop. This case wasn't handled
correct by the recent `ClickDebouncer` change here:
https://github.com/flutter/flutter/pull/172995

More details:

We currently wait until the end of the event loop to set the
`ClickDebouncer`'s state. When other events arrive before the end of the
event loop, they expect the `state` to already be set.

The fix is to set the `state` immediately to allow events to be queued
right away, but still keep the debouncing delayed until the end of the
event loop so that Safari continues to work correctly (issue:
https://github.com/flutter/flutter/issues/172180)

Fixes https://github.com/flutter/flutter/issues/173741
2025-08-19 22:02:15 +00:00
Ben Konyi
8d937c05b1
[ Tool ] Add logging to test_adapter_test.dart (#174073)
Will hopefully help gather some details about why `widget tests can run
in debug mode` is sometimes timing out.

Related issue: https://github.com/flutter/flutter/issues/172636
2025-08-19 21:49:10 +00:00
engine-flutter-autoroll
3fb62e6450
Roll Fuchsia Linux SDK from n0EnLlotF2wczlOq_... to V1A1J6uXZ62Q10i9u... (#174059)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter
Please CC jimgraham@google.com,zra@google.com on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-19 21:24:51 +00:00
Matan Lurey
9f701ac504
Cleanup legacy bringup: true tasks, either removing or enabling (#173815)
Removed two builds we will never get green and are not prioritizing.

Enable the rest which are passing consistently in the background.
2025-08-19 18:35:44 +00:00
Kostia Sokolovskyi
84662834f9
Add Shift+Enter shortcut example for TextField. (#167952)
Closes https://github.com/flutter/flutter/issues/167902

This PR adds a new `TextField` example which shows how to use
`Shortcuts` and `Actions` widgets to create a custom `Shift+Enter`
keyboard shortcut for inserting a new line.

<video
src="https://github.com/user-attachments/assets/d7379db3-79d2-4029-9f9c-7439c12028b3"/>

## 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: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2025-08-19 18:26:04 +00:00
Sven Gasterstädt
bdc2249933
Check that the windows architecture is 64-bit and not the process architecture (#174019)
Changes the platform detection for Windows - so that it can be invoked
from a 32-bit process when we are on a 64-bit system.
This is the case for example 'make' for windows which only comes with a
32-bit version.

_PROCESSOR_ARCHITEW6432_ is only set if the process architecture differs
from the platform architecture.

See
https://learn.microsoft.com/de-de/windows/win32/winprog64/wow64-implementation-details#environment-variables

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

*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

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] 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.
- [ ] 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: Matan Lurey <matanlurey@users.noreply.github.com>
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2025-08-19 18:24:27 +00:00
Rushikeshbhavsar20
e554671074
Improve Stack widget error message for bounded constraints (#173352)
<!--
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
-->

📝 Description
This PR improves the assertion error message in the Stack widget when it
receives unbounded constraints from its parent (e.g., when placed
directly inside a Column or ListView without a bounding widget).

 What Changed
Replaced a generic assertion:
<img width="1918" height="300" alt="Screenshot 2025-08-06 213549"
src="https://github.com/user-attachments/assets/24d90dfb-6876-4fa2-85ee-01c3c1efd7b8"
/>

With a detailed, developer-friendly message:
<img width="2388" height="630" alt="Screenshot 2025-08-07 011126"
src="https://github.com/user-attachments/assets/d74bcd2a-5550-454c-9388-fa9aff9d9167"
/>




Fixes: #172481

This PR addresses the confusing assertion error when a Stack is given
unbounded constraints. By adding a descriptive message, developers will
have clearer guidance on how to resolve layout issues involving Stack
inside widgets like Column or ListView.




## 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-19 18:24:25 +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
Simon Pham
25094b9961
fix: Android build fails when minSdk is set below 24 in build.gradle.kts (#173823) (#173825)
fix: Android build fails when minSdk is set below 24 in build.gradle.kts
(#173823, #173829)

<!--
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 separates the regex for determining minSdkVersion in groovy or
kotlin gradle file when doing Android minSdkVersion migration.

Fixes #173823.

## 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: Reid Baker <1063596+reidbaker@users.noreply.github.com>
2025-08-19 17:36:11 +00:00
chunhtai
3e4d171664
Reapply "Add set semantics enabled API and wire iOS a11y bridge (#161… (#171198)
…265)"

This reverts commit cc04ca4e5594fe9cd87adde34a5eedf14221fc3b.

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

## 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-19 17:33:07 +00:00
DelcoigneYves
a8f940ad03
fix: only use library props for libraries (#172704)
<!--
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
-->

With the change to copy the build types to libraries, there is no check
whether all the properties are valid for libraries. For example,
applicationIdSuffix is only valid for an Android app, not a library.
This adds a check where we are copying to, and only adds the valid
properties.

#169215

## 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: Yves Delcoigne <yves.delcoigne@inthepocket.com>
2025-08-19 17:33:05 +00:00
engine-flutter-autoroll
dbe044ab74
Roll Packages from 5c52c5545f54 to 953cae031cb7 (22 revisions) (#174040)
5c52c5545f...953cae031c

2025-08-19 magder@google.com Add com.android.tools.build:gradle to
dependabot gradle-plugin group (flutter/packages#9848)
2025-08-19 stuartmorgan@google.com [flutter_migrate] Remove source
(flutter/packages#9847)
2025-08-18 lukas.mirbt1@gmail.com [go_router]: Add `RelativeGoRouteData`
and `TypedRelativeGoRoute` (flutter/packages#9732)
2025-08-18 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
edada7c56edf to 20f82749394e (1474 revisions) (flutter/packages#9837)
2025-08-18 engine-flutter-autoroll@skia.org Roll Flutter from
b3fb4c786d80 to 2265d94c6b0b (7 revisions) (flutter/packages#9845)
2025-08-18 stuartmorgan@google.com Disable SwiftPM for `xcode-analyze`
(flutter/packages#9666)
2025-08-17 engine-flutter-autoroll@skia.org Roll Flutter from
0a2906b81d5e to b3fb4c786d80 (5 revisions) (flutter/packages#9840)
2025-08-16 stuartmorgan@google.com Update repo for 3.35 stable release
(flutter/packages#9816)
2025-08-16 engine-flutter-autoroll@skia.org Roll Flutter from
52af7a504025 to 0a2906b81d5e (16 revisions) (flutter/packages#9836)
2025-08-16 stuartmorgan@google.com [image_picker] Updates min SDK to
3.29 (flutter/packages#9830)
2025-08-16 stuartmorgan@google.com [image_picker] Add the ability to
pick multiple videos (flutter/packages#9775)
2025-08-16 stuartmorgan@google.com [image_picker] Add the ability to
pick multiple videos - platform implementations (flutter/packages#9818)
2025-08-16 stuartmorgan@google.com [various] Updates min SDK for
third_party/packages to 3.29 (flutter/packages#9819)
2025-08-16 stuartmorgan@google.com [vector_graphics] Updates min SDK to
3.29 (flutter/packages#9820)
2025-08-16 stuartmorgan@google.com [google_maps_flutter] Updates min SDK
to 3.29 (flutter/packages#9821)
2025-08-16 stuartmorgan@google.com [video_player] Updates min SDK to
3.29 (flutter/packages#9826)
2025-08-15 stuartmorgan@google.com [shared_preferences] Updates min SDK
to 3.29 (flutter/packages#9829)
2025-08-15 magder@google.com [image_picker_ios] Add photo to simulator
Photos library during test (flutter/packages#9759)
2025-08-15 10687576+bparrishMines@users.noreply.github.com
[interactive_media_ads] Updates `README` with information about enabling
desugaring on Android (flutter/packages#9790)
2025-08-15 stuartmorgan@google.com [in_app_purchase] Updates min SDK to
3.29 (flutter/packages#9825)
2025-08-15 engine-flutter-autoroll@skia.org Roll Flutter from
f4334d27934b to 52af7a504025 (29 revisions) (flutter/packages#9832)
2025-08-15 stuartmorgan@google.com [go_router] Update generated output
format (flutter/packages#9817)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-19 17:31:03 +00:00
Matan Lurey
138a60c8f9
Add open_jdk to Linux linux_android_emulator.debug_x64 (#173989)
Towards https://github.com/flutter/flutter/issues/173986.

This build _never_ declared (either directly or through
`platform_properties`) that it required the Java JDK, and appears to
have been "accidentally" getting it installed via a (now expired) cache
of the Java JDK.

I'll file a separate issue of "should platform properties be inherited
by engine v2 sub-builds".

/cc @jason-simmons @gaaclarke for FYI.
2025-08-19 16:16:56 +00:00
engine-flutter-autoroll
e65380a220
Roll Dart SDK from 502455ee300b to 9105d946af95 (3 revisions) (#174002)
https://dart.googlesource.com/sdk.git/+log/502455ee300b..9105d946af95

2025-08-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-110.0.dev
2025-08-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-109.0.dev
2025-08-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com
Version 3.10.0-108.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter
Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert
to ensure that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-19 01:29:27 +00:00
Matan Lurey
946f15a72e
Add open_jdk to Linux analyze (#173988)
Towards https://github.com/flutter/flutter/issues/173986.

This build _never_ declared (either directly or through
`platform_properties`) that it required the Java JDK, and appears to
have been "accidentally" getting it installed via a (now expired) cache
of the Java JDK.
2025-08-18 22:58:24 +00:00
Jenn Magder
aaef1e5cf1
Add "team-ios" label to iOS team triage query (#173997)
It turns out folks have been putting `team-ios` on PRs they want the iOS
team to review. Adding that label to the query:

https://github.com/flutter/flutter/pulls?q=is%3Aopen+is%3Apr+label%3Aplatform-ios%2Cteam-ios+sort%3Acreated-asc+-is%3Adraft


## 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-18 22:56:28 +00:00
Reid Baker
1e1908dc28
Migrate deeplink json creation to public AGP api (#173794)
Reviewers please pay special attention to the tests that were added and
tests that were removed. If you see a set of functionality that is not
covered and should be please say something.

I read every test (and TBH also had to edit most of them) but I had
gemini's agent mode help and I dont trust there is something I missed.

Related to #173651

Newly added tests can be run from `packages/flutter_tools/gradle` with
`./gradlew test --tests
com.flutter.gradle.tasks.DeepLinkJsonFromManifestTaskTest`

## 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-18 20:21:29 +00:00
Ben Konyi
02bf6d36c3
[ Widget Preview ] Don't crash when directory watcher restarts on Windows (#173987)
Fixes https://github.com/flutter/flutter/issues/173895

This is a top-10 crasher for `3.35.{0,1}`.

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-18 20:07:26 +00:00
Ben Konyi
8b2b9d7c8d
[ Widget Preview ] Don't try to instantiate invalid @Preview() applications (#173984)
Applying `@Preview()` to an invalid AST node shouldn't cause the preview
environment to throw an exception due to invalid generated code.

This change adds some additional checks to ensure that invalid
`@Preview()` applications are ignored.

Related issue: https://github.com/flutter/flutter/issues/173959
Related stable hotfix: https://github.com/flutter/flutter/pull/173979
2025-08-18 19:49:29 +00:00
Loïc Sharma
461ce17941
Explain how to run Google Test tests directly (#173978)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-18 19:34:59 +00:00
Srujan Gaddam
0480b069e0
[flutter_tools] Use DWDS 25.0.1 (#173777)
DWDS 25.0.1 requires that a valid reloadedSourcesUri is passed and
updated for both a hot restart and a hot reload. Therefore, the
bootstrap scripts which use it as well as the code to write that file is
updated. Note that this file is read in both DWDS and in the bootstrap
script. Along with this, code is fixed to update modules and digests
regardless of a full restart. Currently, it makes no difference as
neither Flutter tools or DWDS makes use of the updated modules or
digests with the new library bundle format, but it's updated for
consistency.

## 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.
2025-08-18 19:16:21 +00:00
Matan Lurey
2265d94c6b
Remove embedded_android_views (on-device) tests, same as emulator test (#173814)
These tests are identical to the `Linux_android_emu` test that runs on
presubmit:


9583f282a5/.ci.yaml (L408-L416)

These tests do not report benchmarks or any other statistics that would
benefit from a real (on-device) test.
2025-08-18 16:33:30 +00:00
engine-flutter-autoroll
78df185e5a
Roll Skia from 3a17208059ec to 07d71ea4d056 (4 revisions) (#173942)
https://skia.googlesource.com/skia.git/+log/3a17208059ec..07d71ea4d056

2025-08-18
recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com
Roll recipe dependencies (trivial).
2025-08-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn
from b639f97ad620 to 2c53c1b75e06 (5 revisions)
2025-08-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
shaders-base from 5e22a60082ec to 0b85ebb8cd88
2025-08-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
debugger-app-base from 986ca4affc81 to 6943b399ac36

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC chinmaygarde@google.com,fmalita@google.com,kjlubick@google.com
on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-18 15:52:08 +00:00
engine-flutter-autoroll
660c234bb0
Roll Skia from 978726c1e725 to 3a17208059ec (2 revisions) (#173939)
https://skia.googlesource.com/skia.git/+log/978726c1e725..3a17208059ec

2025-08-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
skottie-base from 951c83390400 to d3e0a508e29c
2025-08-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll
jsfiddle-base from 74f9e2cd8bc1 to c4343b58423e

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skia-flutter-autoroll
Please CC chinmaygarde@google.com,fmalita@google.com,kjlubick@google.com
on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-18 06:33:39 +00:00
engine-flutter-autoroll
a8faac8d42
Roll Fuchsia Linux SDK from sLmXksm1vZl2VEeA7... to n0EnLlotF2wczlOq_... (#173936)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter
Please CC chinmaygarde@google.com,zra@google.com on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2025-08-18 03:40:38 +00:00
Huy
b1551a19e4
Enhance FilledButton and Theme Data's documentation to clarify platform-specific visual density behavior (#173695)
- Fix https://github.com/flutter/flutter/issues/155768
- Description: The issue is not a bug but WAI, it's due to visual
density not being the same on each platform by default (see my full
explanation at
[here](https://github.com/flutter/flutter/issues/155768#issuecomment-3178302255)),
see:


f22787193b/packages/flutter/lib/src/material/theme_data.dart (L3250-L3255)

 - This is LOCs where visual density impacts the padding:


a04fb324be/packages/flutter/lib/src/material/button_style_button.dart (L501-L505)



In this PR:
- Add `Visual density effects` section to FilledButton documentation to
avoid confusion for users
- Improve the documentation for
`VisualDensity.defaultDensityForPlatform` by including detailed
information about the specific density for each platform.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

Signed-off-by: huycozy <huy@nevercode.io>
2025-08-18 03:19:33 +00:00