9490 Commits

Author SHA1 Message Date
Ahmed Mohamed Sameh
793b0b89e8
Make sure that a FormField doesn't crash at 0x0 environment (#180810)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the FormField widget.
2026-01-13 16:05:42 +00:00
Ahmed Mohamed Sameh
44fc0a77e8
Make sure that a DisplayFeatureSubScreen doesn't crash in 0x0 environ… (#180357)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
DisplayFeatureSubScreen widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2026-01-13 16:04:07 +00:00
Augusto César Perin
404221c326
Fix RawAutocomplete unmounted crash during async optionsBuilder (#180824)
Adds a mounted check after the async optionsBuilder call to prevent
accessing state on an unmounted widget.

Fixes #170403

## Pre-launch Checklist

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

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-12 19:32:46 +00:00
chunhtai
d81cd3e6f6
Migrate doc and code to use sendAnnounce (#180776)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

as title

## Pre-launch Checklist

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

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-12 17:32:54 +00:00
Ahmed Mohamed Sameh
4b5de7dbfc
Make sure that a FlutterLogo doesn't crash in 0x0 environment (#180617)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the FlutterLogo
widget.
2026-01-12 04:32:33 +00:00
Ahmed Mohamed Sameh
eb95ba422b
Make sure that a CupertinoTabScaffold doesn't crash in 0x0 environment (#179824)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
CupertinoTabScaffold widget.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
2026-01-10 03:07:23 +00:00
Ahmed Mohamed Sameh
5566fdd30c
Make sure that a Container doesn't crash in 0x0 environment (#180350)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Container widget.

Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
2026-01-10 01:05:19 +00:00
Ahmed Mohamed Sameh
4b3f1d599f
Make sure that an Expansible doesn't crash in 0x0 environment (#180478)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the Expansible
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
2026-01-10 01:05:19 +00:00
Hannah Jin
5d37c99f13
[A11y ] Add clearSemanticsin table (#180665)
According to comments in `rendering/object.dart`, If new
[SemanticsNode]s are instantiated in [assembleSemanticsNode] they must
be disposed in [clearSemantics].


fix: https://github.com/flutter/flutter/issues/180666 

## Pre-launch Checklist

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

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-09 19:40:31 +00:00
Ahmed Mohamed Sameh
a6bcce63f5
Make sure that an EditableText doesn't crash in 0x0 environment (#180457)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the EditableText
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2026-01-08 22:02:41 +00:00
Matthew Kosarek
e064e75676
Implementation of tooltip windows for win32 (#179147)
## What's new?
- Implemented tooltip windows for the Win32 platform
- Implemented size-to-content on Win32
- Wired up the window metrics event with constraints
- Updated the example application to demonstrate tooltips
- Wrote a bunch of unit 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: Matej Knopp <matej.knopp@gmail.com>
2026-01-08 21:53:56 +00:00
Mitchell Goodwin
c2b3ae1bfe
Do not dispose CupertinoSheetTransition animation on update and throw ticker error (#180609)
<!--
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 #179337 by moving the disposal of an animation controller outside
of the didUpdate method flow. It was unnecessary to rebuild this
controller on update, and was originally put there to follow the pattern
of the other animations. However, unlike the other animations, this one
is not chained to animations from outside of the transition's place in
the tree, and was throwing exceptions from the ticker mixin in some
cases.

## 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
2026-01-08 02:43:27 +00:00
Mitchell Goodwin
1a86af3ff0
Add drag handle to CupertinoSheet (#179962)
Fixes #179358.

Adds the option to add a native styled drag handle to the top of a
Cupertino sheet through the `showDragHandle` property. By default this
is false, the same way it is for the native SwiftUI sheet.

Styling for the handle is based off of native versions of the handle,
and Apple's Figma files.

From this PR:
<img width="412" height="293" alt="Screenshot 2025-12-16 at 12 53 06 PM"
src="https://github.com/user-attachments/assets/b8f48179-775c-4f90-8930-0ca526e62d33"
/>

From the iOS Maps app (this sheet has a slight transparency)
<img width="401" height="132" alt="Screenshot 2025-12-16 at 12 53 15 PM"
src="https://github.com/user-attachments/assets/640b0736-0fe2-4713-81c9-b89c1c1ac41d"
/>

From the Figma files:
<img width="636" height="371" alt="Screenshot 2025-12-16 at 12 53 36 PM"
src="https://github.com/user-attachments/assets/a6fb7853-84f9-4728-85eb-ffdd6e1167cd"
/>

## Pre-launch Checklist

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

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-07 23:43:58 +00:00
Victor Sanni
6679464ef2
Raw tooltip with smaller API surface that exposes tooltip widget (#177678)
The raw widget used to make a
[Tooltip](https://api.flutter.dev/flutter/material/Tooltip-class.html).

Design doc: flutter.dev/go/codeshare-tooltip

## Constructor
```dart
class RawTooltip extends StatefulWidget {
  const RawTooltip({
    super.key,
    required this.semanticsTooltip,
    required this.tooltipBuilder,
    this.enableTapToDismiss = true,
    this.triggerMode = TooltipTriggerMode.longPress,
    this.enableFeedback = true,
    this.onTriggered,
    this.hoverDelay = Duration.zero,
    this.touchDelay = const Duration(milliseconds: 1500),
    this.dismissDelay = const Duration(milliseconds: 100),
    this.animationStyle = _kDefaultAnimationStyle,
    this.positionDelegate,
    required this.child,
  });
```

## Properties
```dart
  final String semanticsTooltip;
  final TooltipComponentBuilder tooltipBuilder;
  final Duration hoverDelay;
  final Duration touchDelay;
  final Duration dismissDelay;
  final bool enableTapToDismiss;
  final TooltipTriggerMode triggerMode;
  final bool enableFeedback;
  final TooltipTriggeredCallback? onTriggered;
  final AnimationStyle animationStyle;
  final TooltipPositionDelegate? positionDelegate;
  final Widget child;
```

Part of [☂️ Reinforcement: Add more basic components to the core
framework](https://github.com/flutter/flutter/issues/97496)
Part of [☂️ Reinforcement: Refactor widgets from design into the core
before decoupling](https://github.com/flutter/flutter/issues/53059)
Fixes [Custom Overlay for Tooltip Widget
](https://github.com/flutter/flutter/issues/45034)

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
2026-01-07 21:58:42 +00:00
Emmanuel
5d46d0f0f7
New isSemantics and deprecate containsSemantics (#180538)
Fix #180534

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.
2026-01-07 20:05:09 +00:00
Илия
b2d157623e
Fix division by zero in RenderTable intrinsic size methods (#178217)
## Description

This PR fixes a division by zero crash in `RenderTable` when intrinsic
size methods are called on empty tables (0 rows × 0 columns) with
non-zero constraints.

### The Problem

When `RenderTable` has 0 columns and intrinsic size methods
(`computeMinIntrinsicHeight`, `computeMaxIntrinsicHeight`,
`computeMinIntrinsicWidth`, `computeMaxIntrinsicWidth`) are called with
non-zero width constraints, the code calls `_computeColumnWidths()`
without checking if the table is empty. This leads to division by zero
at line 1140:

```dart
final double delta = (minWidthConstraint - tableWidth) / columns;
// When columns = 0, this crashes with division by zero
```

### The Solution

Added early return checks `if (rows * columns == 0) return 0.0;` to all
four intrinsic size methods, matching the pattern already used by other
methods that call `_computeColumnWidths()`:

- `computeDryBaseline` (line 1242) - already has the check
- `computeDryLayout` (line 1274) - already has the check
- `performLayout` (line 1318) - already has the check
- `paint` (line 1461) - already has the check

Now all four intrinsic methods are consistent with the rest of the
codebase.

### Testing

Added comprehensive test coverage (`Empty table intrinsic dimensions
should not crash`) that:
- Creates an empty table (0×0)
- Calls all four intrinsic size methods with various constraints
- Verifies they return 0.0 without crashing

### Changes Made

**packages/flutter/lib/src/rendering/table.dart:**
- Added empty table check to `computeMinIntrinsicWidth` (line 963-965)
- Added empty table check to `computeMaxIntrinsicWidth` (line 978-980)
- Added empty table check to `computeMinIntrinsicHeight` (line 995-997)
- Added empty table check to `computeMaxIntrinsicHeight` (line
1016-1019)

**packages/flutter/test/rendering/table_test.dart:**
- Added test case `Empty table intrinsic dimensions should not crash`
- Tests all four intrinsic methods with both finite and infinite
constraints

## Related Issues

This fix addresses a potential crash when using `RenderTable` with
intrinsic sizing widgets (like `IntrinsicHeight`, `IntrinsicWidth`) on
empty tables.

## Checklist

Before you create this PR, confirm all the requirements listed below by
checking the relevant checkboxes (`[x]`). This will ensure a smooth
review process.

- [x] I have read the [Contributor Guide] and followed the process
outlined there for submitting PRs.
- [x] I have read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I have read and followed the [Flutter Style Guide], including
[Features we expect every widget to implement].
- [x] I have signed the [CLA].
- [x] I have listed at least one issue that this PR fixes (defensive
programming for edge case).
- [x] I have updated/added relevant documentation (doc comments with
`///`).
- [x] I have added new tests that verify the fix works.
- [x] All existing and new tests are passing (`flutter analyze` shows no
issues).
- [x] I have followed the [breaking change policy] and added [Data
Driven Fixes] where applicable (no breaking changes in this PR).

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

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
2026-01-07 15:07:19 +00:00
Huy
af63b5e8c3
Fix TabBar.image does not render at initialIndex for the first time (#179616)
- Fix https://github.com/flutter/flutter/issues/59143
- The investigation is at
https://github.com/flutter/flutter/issues/59143#issuecomment-3626318406
- Describe the fix: 
- Make `_IndicatorPainter` listen to both the controller animation and a
new painter notifier triggered when the indicator image finishes
fetching.
    - Added some regression tests

<details open>
<summary>Demo</summary>

| before | after |
| --------------- | --------------- |
<video
src="https://github.com/user-attachments/assets/10bb68f7-1c65-422b-b87f-c2b2dd602e70"/>
| <video
src="https://github.com/user-attachments/assets/bd5a9d8a-97c8-4a8d-ba43-44242f50ec94"/>

</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.
- [ ] 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>
2026-01-07 11:43:34 +00:00
Bruno Leroux
7d9198a83d
Fix DropdownMenuEntry.style not resolved when entry is highlighted (#178873)
## Description

This PR adds logic to resolve `DropdownMenuEntry.style` properties with
the correct `WidgetState` when an item is highlighted.

When `MenuItemButton` are highlighted the focused state is not added
automatically because the focus does not move to the items (it stays on
the `TextField` in order to let the user enters text to filter the items
list). This PR sets the `MenuItemButton.statesController` with a forced
focused state to let `MenuItemButton` know that the focused state should
be use to resolve the properties.

## Related Issue

Fixes [DropdownMenuEntry style's text style is not resolving with
states](https://github.com/flutter/flutter/issues/177363)

## Tests

- Adds 1 tests.
2026-01-07 09:08:32 +00:00
Md. Murad Hossin
eb7fb9a3d7
Fix/ios share context menu (#176199)
This PR fixes https://github.com/flutter/flutter/issues/173491 by adding
the missing 'Share' option to the default iOS SystemContextMenu when
shareEnabled is true.

Changes:

Added IOSSystemContextMenuItemShare to getDefaultItems in
system_context_menu.dart.
Added a widget test to ensure Share is present in the default items for
non-empty selections on iOS.
Rationale:
This aligns Flutter's default iOS text selection context menu with
native iOS behavior, ensuring users see the expected 'Share' option when
selecting text.

Demo:
Video showing Share option in iOS context menu:
https://github.com/user-attachments/assets/e04cd1f9-7d92-4147-a09b-719f03d9c625
2026-01-06 18:30:13 +00:00
Kostia Sokolovskyi
be03f0d3b1
Add tooltip support to PlatformMenuItem and PlatformMenu. (#180069)
Closes https://github.com/flutter/flutter/issues/180031

### Description
- Adds `tooltip` support to `PlatformMenuItem` and `PlatformMenu`
- Updates `platform_menu_bar_test.dart` to cover `tooltip` related
changes and makes test-specific code private
- Updates `FlutterMenuPlugin.mm` to support `tooltip`
- Updates `FlutterMenuPluginTest.mm` to cover `tooltip` related changes


https://github.com/user-attachments/assets/abafc1ec-dc2f-45ae-a3b5-1e88759dac37

<details closed><summary>Code sample</summary>

```dart
// THIS SAMPLE ONLY WORKS ON MACOS.

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

/// Flutter code sample for [PlatformMenuBar].

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

enum MenuSelection { about, showMessage }

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

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

class PlatformMenuBarExample extends StatefulWidget {
  const PlatformMenuBarExample({super.key});

  @override
  State<PlatformMenuBarExample> createState() => _PlatformMenuBarExampleState();
}

class _PlatformMenuBarExampleState extends State<PlatformMenuBarExample> {
  String _message = 'Hello';
  bool _showMessage = false;

  void _handleMenuSelection(MenuSelection value) {
    switch (value) {
      case MenuSelection.about:
        showAboutDialog(
          context: context,
          applicationName: 'MenuBar Sample',
          applicationVersion: '1.0.0',
        );
      case MenuSelection.showMessage:
        setState(() {
          _showMessage = !_showMessage;
        });
    }
  }

  @override
  Widget build(BuildContext context) {
    ////////////////////////////////////
    // THIS SAMPLE ONLY WORKS ON MACOS.
    ////////////////////////////////////

    // This builds a menu hierarchy that looks like this:
    // Flutter API Sample
    //  ├ About
    //  ├ ────────  (group divider)
    //  ├ Hide/Show Message
    //  ├ Messages
    //  │  ├ I am not throwing away my shot.
    //  │  └ There's a million things I haven't done, but just you wait.
    //  └ Quit
    return PlatformMenuBar(
      menus: <PlatformMenuItem>[
        PlatformMenu(
          label: 'Flutter API Sample',
          menus: <PlatformMenuItem>[
            PlatformMenuItemGroup(
              members: <PlatformMenuItem>[
                PlatformMenuItem(
                  label: 'About',
                  tooltip: 'Show information about APP_NAME',
                  onSelected: () {
                    _handleMenuSelection(MenuSelection.about);
                  },
                ),
              ],
            ),
            PlatformMenuItemGroup(
              members: <PlatformMenuItem>[
                PlatformMenuItem(
                  onSelected: () {
                    _handleMenuSelection(MenuSelection.showMessage);
                  },
                  shortcut: const CharacterActivator('m'),
                  label: _showMessage ? 'Hide Message' : 'Show Message',
                  tooltip: _showMessage
                      ? 'The message will be hidden.'
                      : 'The message will be shown.',
                ),
                PlatformMenu(
                  label: 'Messages',
                  menus: <PlatformMenuItem>[
                    PlatformMenuItem(
                      label: 'I am not throwing away my shot.',
                      shortcut: const SingleActivator(
                        LogicalKeyboardKey.digit1,
                        meta: true,
                      ),
                      onSelected: () {
                        setState(() {
                          _message = 'I am not throwing away my shot.';
                        });
                      },
                    ),
                    PlatformMenuItem(
                      label:
                          "There's a million things I haven't done, but just you wait.",
                      shortcut: const SingleActivator(
                        LogicalKeyboardKey.digit2,
                        meta: true,
                      ),
                      onSelected: () {
                        setState(() {
                          _message =
                              "There's a million things I haven't done, but just you wait.";
                        });
                      },
                    ),
                  ],
                ),
              ],
            ),
            if (PlatformProvidedMenuItem.hasMenu(
              PlatformProvidedMenuItemType.quit,
            ))
              const PlatformProvidedMenuItem(
                type: PlatformProvidedMenuItemType.quit,
              ),
          ],
        ),
      ],
      child: Center(
        child: Text(
          _showMessage
              ? _message
              : 'This space intentionally left blank.\n'
                    'Show a message here using the menu.',
        ),
      ),
    );
  }
}

```

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-06 15:22:38 +00:00
Bruno Leroux
d5424a5bf2
Add DropdownMenuFormField.errorBuilder (#179345)
## Description

This PR adds the `DropdownMenuFormField.errorBuilder` property which
makes it possible to customize the widget used to display the error
message.

This is a follow-up to https://github.com/flutter/flutter/pull/162255
which added the `errorBuilder` property to other form fields.

## Related Issue

Fixes [DropdownMenuFormField is missing an errorBuilder
property](https://github.com/flutter/flutter/issues/172416)

## Tests

Updates 5 tests.
Adds 1 test.
2026-01-06 15:22:37 +00:00
Ahmed Mohamed Sameh
b659d5fec6
Make sure that a ColorFiltered doesn't crash 0x0 environment (#180307)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the ColorFiltered
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2026-01-06 01:19:06 +00:00
Ahmed Mohamed Sameh
e7f1721a09
Make sure that a FadeInImage doesn't crash in 0x0 environment (#180495)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the FadeInImage
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2026-01-06 01:06:59 +00:00
Hannah Jin
a397a24f6c
Replace semantic announcements in expansion tile for Android (#179917)
fixes: https://github.com/flutter/flutter/issues/177785  
## Pre-launch Checklist

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

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-06 00:40:24 +00:00
Emmanuel
68d3d7b421
Add accessibilityAnnouncement matcher (#180058)
Fix #180057

## Pre-launch Checklist

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-05 20:54:06 +00:00
Matthew Kosarek
4333b7722c
Implement popup windows in the API and test code (#179757)
## What's new?
- Add `PopupWindowController`, `PopupWindowControllerDelegate`, and
`PopupWindow`
- Implement reference logic for popup windows in the test bindings
- Add tests for the popup windows API

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2026-01-05 17:18:16 +00:00
Kostia Sokolovskyi
46c8606b88
Fix Gradient.scale not preserving transformation. (#179493)
Fixes https://github.com/flutter/flutter/issues/163972

### Description
- Fixes `Gradient.scale` methods to not lose transform

| BEFORE | AFTER |
| - | - |
| <img width="481" height="515" alt="before"
src="https://github.com/user-attachments/assets/c9644fed-4016-4dea-9e39-c5c5fa311cee"
/> | <img width="481" height="515" alt="after"
src="https://github.com/user-attachments/assets/f77629e3-4d7e-49fb-9e8f-d044e3dd348c"
/> |

<details closed><summary>Code sample</summary>

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Padding(
          padding: const EdgeInsets.all(10),
          child: Column(
            spacing: 10,
            children: [
              Expanded(
                child: Row(
                  spacing: 10,
                  children: [
                    _buildGradientContainer(
                      LinearGradient(
                        colors: [
                          Color(0xFFCC5555),
                          Color(0xFF55BB55),
                          Color(0xFF5555CC),
                        ],
                        transform: GradientRotation(0.7853981634),
                      ),
                    ),
                    _buildGradientContainer(
                      LinearGradient(
                        colors: [
                          Color(0xFFCC5555),
                          Color(0xFF55BB55),
                          Color(0xFF5555CC),
                        ],
                        transform: GradientRotation(0.7853981634),
                      ).scale(0.5),
                    ),
                  ],
                ),
              ),
              Expanded(
                child: Row(
                  spacing: 10,
                  children: [
                    _buildGradientContainer(
                      RadialGradient(
                        colors: [
                          Color(0xFFCC5555),
                          Color(0xFF55BB55),
                          Color(0xFF5555CC),
                        ],
                        center: Alignment.topCenter,
                        transform: GradientRotation(0.7853981634),
                      ),
                    ),
                    _buildGradientContainer(
                      RadialGradient(
                        colors: [
                          Color(0xFFCC5555),
                          Color(0xFF55BB55),
                          Color(0xFF5555CC),
                        ],
                        center: Alignment.topCenter,
                        transform: GradientRotation(0.7853981634),
                      ).scale(0.5),
                    ),
                  ],
                ),
              ),
              Expanded(
                child: Row(
                  spacing: 10,
                  children: [
                    _buildGradientContainer(
                      SweepGradient(
                        colors: [
                          Color(0xFFCC5555),
                          Color(0xFF55BB55),
                          Color(0xFF5555CC),
                          Color(0xFFCC5555),
                        ],
                        center: Alignment.topCenter,
                        transform: GradientRotation(0.7853981634),
                      ),
                    ),
                    _buildGradientContainer(
                      SweepGradient(
                        colors: [
                          Color(0xFFCC5555),
                          Color(0xFF55BB55),
                          Color(0xFF5555CC),
                          Color(0xFFCC5555),
                        ],
                        center: Alignment.topCenter,
                        transform: GradientRotation(0.7853981634),
                      ).scale(0.5),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }

  Widget _buildGradientContainer(Gradient gradient) {
    return Expanded(
      child: DecoratedBox(
        decoration: BoxDecoration(gradient: gradient),
        child: const SizedBox.expand(),
      ),
    );
  }
}
```

</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.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-05 10:15:18 +00:00
chunhtai
423a30323c
Relands "Feat: Add a11y for loading indicators (#165173)" (#178402)
This reverts commit ef29db350f0951ab976e2fdb5d092e65578329e5.

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

reland https://github.com/flutter/flutter/pull/165173

## Pre-launch Checklist

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

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2026-01-02 22:43:24 +00:00
Justin McCandless
bef11d207f
Some cleanup of cross library test imports (#177029)
There is a lot of cross-library importing in the framework unit tests
that I'd like to clean up, see the design doc for more:
https://docs.google.com/document/d/1UHxALQqCbmgjnM1RNV9xE2pK3IGyx-UktGX1D7hYCjs/edit?tab=t.0

This PR cleans up a few obvious instances and adds TODOs for others. I
created this while doing an investigation for the design doc linked
above. I hope that we'll be able to follow up with fixes for all of the
problematic tests (tracked in the issue below).

Part of https://github.com/flutter/flutter/issues/177028
2026-01-02 19:20:06 +00:00
Ahmed Mohamed Sameh
6954931bb8
Make sure that a DecoratedBox doesn't crash in 0x0 environment (#180329)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the DecoratedBox
widget.
2025-12-31 01:51:15 +00:00
Ahmed Mohamed Sameh
8d5a463f58
Make sure that a CheckedModeBanner doesn't crash in 0x0 environment (#180280)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the CheckedModeBanner
widget.
2025-12-30 23:23:09 +00:00
Tong Mu
0015d2b6bf
[Framework] iOS style blurring and ImageFilterConfig (#175473)
This PR adds the framework support for a new iOS-style blur. The new
style, which I call "bounded blur", works by adding parameters to the
blur filter that specify the bounds for the region that the filter
sources pixels from.

As discussed in design doc
[flutter.dev/go/ios-style-blur-support](http://flutter.dev/go/ios-style-blur-support),
it's impossible to pass layout information to filters with the current
`ImageFilter` design. Therefore this PR creates a new class
`ImageFilterConfig`.

This PR also applies bounded blur to `CupertinoPopupSurface`. The
following images show the different looks of a dialog in front of
background with abrupt color changes just outside of the border. Notice
how the abrupt color changes no longer bleed in.

<img width="639" height="411" alt="image"
src="https://github.com/user-attachments/assets/4ceb9620-1056-45c3-b5fa-2ed16d90aace"
/>

<img width="639" height="411" alt="image"
src="https://github.com/user-attachments/assets/abe564f7-ea60-4d07-ad58-063c0e3794a5"
/>

This feature continues to matter for iOS 26, since the liquid glass
design also heavily features blurring.

### API changes

* `BackdropFilter`: Add `filterConfig`
* `RenderBackdropFilter`: Add `filterConfig`. Deprecate `filter`.
* `ImageFilter`: Add `debugShortDescription` (previously private
property `_shortDescription`)

### Demo

The following video compares the effect of a bounded blur and an
unbounded blur.


https://github.com/user-attachments/assets/f715db44-c0a0-4ac8-a163-6b859665b032

<details>
<summary>
Demo source
</summary>

```
// Add to pubspec.yaml:
//
//  assets:
//      - assets/kalimba.jpg
//
// and download the image from
// ec6f550237/engine/src/flutter/impeller/fixtures/kalimba.jpg

import 'package:flutter/material.dart';

void main() => runApp(const MaterialApp(home: BlurEditorApp()));

class ControlPoint extends StatefulWidget {
  const ControlPoint({
    super.key,
    required this.position,
    required this.onPanUpdate,
    this.radius = 20.0,
  });

  final Offset position;
  final GestureDragUpdateCallback onPanUpdate;
  final double radius;

  @override
  ControlPointState createState() => ControlPointState();
}

class ControlPointState extends State<ControlPoint> {
  bool isHovering = false;

  @override
  Widget build(BuildContext context) {
    return Positioned(
      left: widget.position.dx - widget.radius,
      top: widget.position.dy - widget.radius,
      child: MouseRegion(
        onEnter: (_) { setState((){ isHovering = true; }); },
        onExit: (_) { setState((){ isHovering = false; }); },
        cursor: SystemMouseCursors.move,
        child: GestureDetector(
          onPanUpdate: widget.onPanUpdate,
          child: AnimatedContainer(
            duration: const Duration(milliseconds: 200),
            width: widget.radius * 2,
            height: widget.radius * 2,
            decoration: BoxDecoration(
              shape: BoxShape.circle,
              color: isHovering
                  ? Colors.white.withValues(alpha: 0.8)
                  : Colors.white.withValues(alpha: 0.4),
              border: Border.all(color: Colors.white, width: 2),
              boxShadow: [
                if (isHovering)
                  BoxShadow(
                    color: Colors.white.withValues(alpha: 0.5),
                    blurRadius: 10,
                    spreadRadius: 2,
                  )
              ],
            ),
            child: const Icon(Icons.drag_indicator, size: 16, color: Colors.black54),
          ),
        ),
      ),
    );
  }
}

class BlurPanel extends StatelessWidget {
  const BlurPanel({super.key, required this.blurRect, required this.bounded});

  final Rect blurRect;
  final bool bounded;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Expanded(
            child: Stack(
              children: [
                Positioned.fill(
                  child: Image.asset(
                    'assets/kalimba.jpg',
                    fit: BoxFit.cover,
                  ),
                ),
                Positioned.fromRect(
                  rect: blurRect,
                  child: ClipRect(
                      child: BackdropFilter(
                    filterConfig: ImageFilterConfig.blur(
                        sigmaX: 10, sigmaY: 10, bounded: bounded),
                    child: Container(),
                  )),
                ),
              ],
            ),
          ),
          Padding(
            padding: const EdgeInsets.all(8.0),
            child: Text(
              bounded ? 'Bounded Blur' : 'Unbounded Blur',
              style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
            ),
          ),
        ],
      ),
    );
  }
}

class BlurEditorApp extends StatefulWidget {
  const BlurEditorApp({super.key});

  @override
  State<BlurEditorApp> createState() => _BlurEditorAppState();
}

class _BlurEditorAppState extends State<BlurEditorApp> {
  Offset p1 = const Offset(100, 100);
  Offset p2 = const Offset(300, 300);

  @override
  Widget build(BuildContext context) {
    final blurRect = Rect.fromPoints(p1, p2);

    return Scaffold(
      body: Stack(
        children: [
          Positioned.fill(
            child: Row(
              children: [
                Expanded(
                  child: BlurPanel(blurRect: blurRect, bounded: true),
                ),
                Expanded(
                  child: BlurPanel(blurRect: blurRect, bounded: false),
                ),
              ],
            ),
          ),

          ControlPoint(position: p1, onPanUpdate: (details) { setState(() => p1 = details.globalPosition); }),
          ControlPoint(position: p2, onPanUpdate: (details) { setState(() => p2 = details.globalPosition); }),
        ],
      ),
    );
  }
}

```

</details>


## 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-12-30 21:57:28 +00:00
Jonathan Gilbert
8fe208e520
Add support for Shift-Delete, Ctrl-Insert and Shift-Insert (#178561)
This PR adds `SingleActivator` mappings for IBM CUA style clipboard
accessors, with which Shift-Delete, Ctrl-Insert and Shift-Insert are
equivalent to ^X ^C ^V. These mappings are natively supported on Windows
and Linux (but not OS X).

~Not sure what to do about:~
- ~Documentation: Are ^X ^C ^V already documented?~
- ~Tests: Are there existing tests for ^X ^C ^V already? Is it possible
to mock out the clipboard so that a test of this functionality doesn't
hit the actual system clipboard?~
- ~OS X: Is it a problem that, with this change, Flutter will accept
these additional shortcuts even though they aren't a part of the
platform paradigm?~

UPDATE:
I'm not aware of existing documentation of clipboard shortcuts.

I have added tests, both of the existing ^X ^C ^V and of the IBM CUA
style mappings added by this PR, and in the current iteration the
changes do not add IBM CUA style mappings on OS X.

Fixes: #178483

## 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-12-29 22:50:32 +00:00
Ahmed Mohamed Sameh
10cfc003c3
Make sure that a WidgetsApp doesn't crash in 0x0 environment (#180224)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the WidgetsApp
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-12-27 01:14:08 +00:00
Ahmed Mohamed Sameh
935eda8b48
Make sure that an AnimatedSize doesn't crash in 0x0 environment (#180174)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the AnimatedSize
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-12-27 00:22:24 +00:00
Ahmed Mohamed Sameh
c7ed16af71
Make sure that an AnimatedGrid doesn't crash in 0x0 environment (#180159)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the AnimatedGrid
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-12-27 00:14:05 +00:00
Ahmed Mohamed Sameh
eb2e689a69
Make sure that an AnimatedCrossFade does not crash in 0x0 environment (#180088)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the AnimatedCrossFade
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-12-27 00:12:17 +00:00
Ahmed Mohamed Sameh
a35e01c8e7
Make sure that an AnimatedList doesn't crash in 0x0 environment (#180123)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the AnimatedList
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-12-27 00:12:17 +00:00
Kishan Rathore
e5be1a3904
fix: exclude semantics for disabled dates (#178981)
## Changes
* Exclude semantics for disabled dates directly in CupertinoDatePicker

fixes: #178713

## 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-12-24 07:53:19 +00:00
Bruno Leroux
0c724d3579
Add SnackBarTheme (#180001)
## Description

This PR adds the `SnackBarTheme` subclass of InheritedTheme. Similarly
to other theme classes.

Despite missing, this class was mentioned in
[flutter.dev/go/material-theme-system-updates](http://flutter.dev/go/material-theme-system-updates):
"SnackBarTheme and SnackBarThemeData are conformant.. "


## Related Issue
Fixes [Missing
SnackBarTheme](https://github.com/flutter/flutter/issues/180000)

## Tests

Adds 2 tests.
2025-12-23 08:47:20 +00:00
Ahmed Mohamed Sameh
162ced574f
Make sure that a CupertinoTextSelectionToolbarButton doesn't crash in… (#179995)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
CupertinoTextSelectionToolbarButton widget.
2025-12-18 22:02:22 +00:00
Kostia Sokolovskyi
4717a64898
Add Slider.showValueIndicator property. (#179661)
Closes https://github.com/flutter/flutter/issues/179660

### Description

- Adds `Slider.showValueIndicator` property
- Adds test to verify that `Slider.showValueIndicator` takes priority
over `SliderTheme.showValueIndicator`

## Pre-launch Checklist

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

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

---------

Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2025-12-18 09:03:20 +00:00
JeelChandegra
47b1f5f5c2
Improve assertion messages in Tab widget for better clarity (#178295)
<!--
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
-->

*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*

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

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

## 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>
2025-12-17 21:03:14 +00:00
chunhtai
4f07d50216
Clamps input value for progress indicator (#179898)
<!--
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
-->

Update the code to match the documentation

```
 /// A value of 0.0 means no progress and 1.0 means that progress is complete.
  /// The value will be clamped to be in the range 0.0-1.0.
```

## 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-12-17 20:10:21 +00:00
Bruno Leroux
57c3f8b665
Add FloatingActionButtonTheme (#179736)
## Description

This PR adds the `FloatingActionButtonTheme` subclass of InheritedTheme.
Similarly to other theme classes.

This missing theme class was mentioned in
[flutter.dev/go/material-theme-system-updates](http://flutter.dev/go/material-theme-system-updates):
"FloatingActionButtonThemeData is conformant but there’s no
FloatingActionButtonTheme class. "


## Related Issue

Fixes [Missing
FloatingActionButtonTheme](https://github.com/flutter/flutter/issues/179735)

## Tests

Adds 2 tests.
2025-12-17 14:28:25 +00:00
Job Guldemeester
1b2baab4c3
Adds property passthrough for CheckboxListTile, SwitchListTile and RadioListTile (#178098)
<!--
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 adds extra properties to `CheckboxListTile`, `SwitchListTile`
and `RadioListTile`. These properties are already implemented for the
`ListTile` and passed through from `CheckboxListTile`, `SwitchListTile`
and `RadioListTile` to the underlying `ListTile`.

The following properties are added:
    - `horizontalTitleGap`
    - `minVerticalPadding`
    - `minLeadingWidth`
    - `minTileHeight`

Fixes #83898 and builds on #154417 and #83902

## 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: Victor Sanni <victorsanniay@gmail.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2025-12-17 08:32:24 +00:00
Ahmed Mohamed Sameh
44a143ed0b
Make sure that a CupertinoTextFormFieldRow doesn't crash in 0x0 envir… (#179932)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
CupertinoTextFormFieldRow widget.
2025-12-17 06:29:13 +00:00
Ahmed Mohamed Sameh
7d1e466d0e
Make sure that a CupertinoTabView doesn't crash in 0x0 environment (#179845)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the CupertinoTabView
widget.
2025-12-17 06:24:57 +00:00
Ahmed Mohamed Sameh
17779252c5
Make sure that a CupertinoTextField doesn't crash in 0x0 environment (#179865)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the
CupertinoTextField widget.
2025-12-17 06:24:57 +00:00
Ahmed Mohamed Sameh
b47a810ab0
Make sure that a CupertinoSwitch doesn't crash in 0x0 environment (#179748)
This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the CupertinoSwitch
widget.
2025-12-17 06:22:57 +00:00