Fixes an issue where multiple cursors were shown incorrectly
This pull request is a manual cherry pick of
https://github.com/flutter/flutter/pull/175044 after I had trouble
updating the automatic cherry pick pull request
(https://github.com/flutter/flutter/pull/175393).
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/173106
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter
developers. See [best
practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md)
for examples
[flutter/173106](https://github.com/flutter/flutter/issues/173106) -
Fixes an issue where multiple cursors were shown incorrectly
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot
ship an iOS app)? Does it impact development (ex. flutter doctor crashes
when Android Studio is installed), or the shipping production app (the
app crashes on launch)
App is usable but shows multiple cursors incorrectly.
### Workaround:
Is there a workaround for this issue?
No.
### Risk:
What is the risk level of this cherry-pick?
- [x] Low
- [ ] Medium
- [ ] High
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
- [x] Yes
- [ ] No
### Validation Steps:
What are the steps to validate that this fix works?
Create a list with many text fields. Tap on one text field to focus it.
Swipe on another text field. Only at most one cursor should be visible
at a time.
Co-authored-by: Memet <54338732+Memet18@users.noreply.github.com>
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/174015
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Removes obsolete warning and error message when switching between build mode through Xcode.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
When building through Xcode, if you previously ran from a different build mode (debug, profile, release), it will show a warning (or error if archiving) that you need to run a Flutter command to have the correct build settings. This is no longer required.
### Workaround:
Is there a workaround for this issue?
Run the command the warning/error provides.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
1. flutter build ios --release
2. Run in Xcode (debug mode)
3. See there is no warning
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/174437
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
When running a Flutter web application in debug mode, the console is spammed with non-fatal error messages.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
When running a Flutter web application in debug mode, the console is spammed with `DebugService: Error serving requestsError: Unsupported operation: Cannot send Null`.
### Workaround:
Is there a workaround for this issue?
Manually patching `$PUB_CACHE/hosted/pub.dev/dwds-24.4.0+1/lib/src/services/debug_service.dart` as described in https://github.com/flutter/flutter/issues/174437#issuecomment-3228740745.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Run `flutter run -d chrome` and see that the console spam is gone.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/172627
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Do not print out NSBonjourService key not found error in non-verbose mode.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Without the fix, it would show the error message to all flutter apps when building on macOS 26.
### Workaround:
Is there a workaround for this issue?
Manually add the key in Info.plist
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Run `flutter build ios` on macOS 26.
I have manually verified that it worked on both macOS 26 and older 15.6
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
< Replace with issue link here >
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
< Replace with changelog description here >
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
< Replace with impact description here >
### Workaround:
Is there a workaround for this issue?
< Replace with workaround here >
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
< Replace with validation steps here >
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
https://github.com/flutter/flutter/issues/173823
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
On Android builds that do not use flutter.minSdkVersion and do use a value lower than 24 in a kotlin build file, correct flutters auto migration to update value with kotlin syntax. https://github.com/flutter/flutter/pull/173825
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
3.35 bumped the min android api level to api 24. We have an auto migrator to handle if users did not use flutter.minSdkVersion and did set an integer to auto update. The auto update logic produces a syntax error in kotlin build files but the matcher matches kotlin build files. CP is a good idea because 3.35 users are the most likley to be impacted.
### Workaround:
Is there a workaround for this issue?
Manually edit build.gradle.kts
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Take flutter build that uses minsdk 22, update to flutter 3.35 and run flutter build apk.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/173960
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Starting the widget previewer fails if Chrome or Edge is not installed.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
The Flutter tool crashes with a `StateError` if `flutter widget-preview start` is run on a host with no Chrome or Edge installed without providing any meaningful error message.
### Workaround:
Is there a workaround for this issue?
Installing Chrome or Edge, but it's not clear that this needs to be done based on the failure mode.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Run `flutter widget-preview start` on a device without Chrome or Edge and verify that there's an error message telling users to install Chrome or Edge.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/173895
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
When running on Windows, `flutter widget-preview start` eventually crashes due to an unhandled exception from the Windows file system watcher that should not be considered fatal.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Given enough time, the file system watcher backing the `WindowsDirectoryWatcher` instance will add an error to the stream with the `Directory watcher closed unexpectedly` message. The `WindowsDirectoryWatcher` restarts the backing file system watcher, but if the event stream doesn't have an error handler registered, the tool crashes due to the unhandled exception.
### Workaround:
Is there a workaround for this issue?
No.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Run `flutter widget-preview start` on Windows for a prolonged period of time.
Fixes https://github.com/flutter/flutter/issues/173959
This is a top-10 crasher on `3.35.{0,1}`, but the underlying preview detection logic has been completely rewritten since the stable branch cut.
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
Part 2 of https://github.com/flutter/flutter/issues/144218
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Implementation of a future fix to allow Xcode 26 to `flutter run` twice in a row.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Flutter developers running Xcode 26 can `flutter run` to a tethered iOS device once. However subsequent `flutter run` attempts are likely to fail.
### Workaround:
Is there a workaround for this issue?
Quitting and reopening Xcode.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Create a flutter project and run `flutter run` twice in a row with a physical iOS 17+ device and Xcode 26.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
Part 1 of https://github.com/flutter/flutter/issues/144218
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Preliminary work for a future fix to allow Xcode 26 to `flutter run` twice in a row.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Flutter developers running Xcode 26 can `flutter run` to a tethered iOS device once. However subsequent `flutter run` attempts are likely to fail. This is the first of several PRs to work around that issue.
### Workaround:
Is there a workaround for this issue?
Quitting and reopening Xcode.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
N/A. This PR adds the classes and functions needed for a future commit, which will turn the new feature on.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/172627
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Prevents a non-fatal error from causing Xcode compilation failures on macOS 26.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Building iOS flutter apps may crash with Xcode 26.
### Workaround:
Is there a workaround for this issue?
Add NSBonjourServices and NSLocalNetworkUsageDescription settings to your iOS app's Info.plist.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
1. `flutter create` a new app on macOS 26 beta
2. Install Xcode 26 beta 5
3. `flutter run`
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/150279
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Emits a warning if `--[no-]disable-dds` is used, users should prefer `--[no-]dds`.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Gives a full stable release of warnings before removing a deprecated feature.
### Workaround:
Is there a workaround for this issue?
N/A
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
N/A
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/172789
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
https://github.com/flutter/flutter/issues/172789https://github.com/flutter/flutter/issues/172789 Using a lower version of Gradle results in a warning message to bump to a minimum of version `8.7.2`, but the warning should bump to a minimum of version `8.7.0`
Reids edit:
[flutter/172789](https://github.com/flutter/flutter/issues/172789) When building for Android, Change warning for minimum gradle version from 8.7.2 to 8.7.0.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
When on a lower version of Gradle, Flutter tooling would log a suggestion to bump to a minimum of `8.7.0` instead of `8.7.2`
### Workaround:
Is there a workaround for this issue?
Yes, the user would bump to a higher valid version of Gradle.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Use a low version of gradle and see that the Flutter tool recommends using gradle `8.7.0`
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/162324
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
This PR fixes a bug where the locale property of a Text widget was not being correctly passed to the accessibility layer, resulting in screen readers not knowing the language of the text.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
This bug critically impacted accessibility, causing screen readers to mispronounce text in foreign languages and creating a confusing, inaccessible experience for users with visual impairments. The fix ensures the locale property on the Text widget is no longer ignored, correctly passing the language information to the underlying accessibility services so the text is read intelligibly.
### Workaround:
Is there a workaround for this issue?
No.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Unit tests verify this change works as expected.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/57497
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
N/A (Beta)
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Provides a CLI-issued warning to plugins using a workaround we wanted to remove in 2020.
Once this is CP'd in 3.35, the `master` branch (post-3.35) can remove the workaround/tech debt.
### Workaround:
Is there a workaround for this issue?
N/A
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
N/A
The `frameworkVersion` string written to the version files wasn't
actually parsable by `GitTagVersion` as it didn't match the format
output by `git`.
This change updates the `frameworkVersion` format to use a `-` instead
of a `.` before the commit count and adds support to the version parsing
regex to handle both `.` and `-` separators before the commit count.
Fixes https://github.com/flutter/flutter/issues/172091
Issues have been solved, we can now have the tests back
## 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.
- [ ] 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.
We need a robust way to get the duration of a route transition in tests,
so that tests can remain independent of the type of route transition and
its duration.
With this PR, this will be the canonical way to pump until a page
transition has finished:
```dart
testWidgets('example', (WidgetTester tester) async {
final TransitionDurationObserver observer = TransitionDurationObserver();
await tester.pumpWidget(
MaterialApp(
navigatorObservers: <NavigatorObserver>[observer],
onGenerateRoute: (RouteSettings settings) { ... },
),
);
expect(find.text('Page 1'), findsOneWidget);
expect(find.text('Page 2'), findsNothing);
// Pump through the whole transition.
await tester.tap(find.text('Next'));
await observer.pumpPastTransition(tester);
expect(find.text('Page 1'), findsNothing);
expect(find.text('Page 2'), findsOneWidget);
// Or, pump through part of a transition with the duration.
await tester.tap(find.text('Back'));
await tester.pump(observer.transitionDuration ~/ 2);
expect(find.text('Page 1'), findsOneWidget);
expect(find.text('Page 2'), findsOneWidget);
});
```
This was spun out of https://github.com/flutter/flutter/pull/165832,
where updating the default route transition and its duration broke tests
in the framework, in customer tests, and in Google tests.
FYI @chrisbobbe
---------
Co-authored-by: Jing Shao <87506348+jingshao-code@users.noreply.github.com>
Adds support for a subset of the DTD `Editor` service registered by IDEs
for use by the widget preview scaffold. Currently, this feature subset
includes support for listening for:
- Source file selection events
- Editor theme change events
This change does not introduce any new functionality that makes use of
these new DTD `Editor` events.
Description
This PR fixes an accessibility issue where CheckedPopupMenuItem was not
properly announcing its checked state to screen readers.
Before
https://github.com/user-attachments/assets/b1785522-eea4-4fc3-9a9a-1872615838c0
After
Demo app: https://checked-0707.web.app/https://github.com/user-attachments/assets/a8083c0b-11c8-4e93-bd71-842dfe5fa344
Issues Fixed
This PR fixes https://github.com/flutter/flutter/issues/171463.
Breaking Changes
None.
## 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.
Sources under `packages/flutter_tools/` aren't accessible to the average
Flutter user by navigating through sources from their projects, so it
doesn't need to be as explicitly verbose with types for readability
purposes. The `always_specify_types` lint results in extremely verbose
code within the tool which adds little value.
This change disables `always_specify_types` in favor of a new set of
lints that aim to reduce verbosity by removing obvious types while also
maintaining readability in cases where variable types otherwise wouldn't
be obvious:
- `omit_obvious_local_variable_types`
- `omit_obvious_property_types`
- `specify_nonobvious_local_variable_types`
- `specify_nonobvious_property_types`
## Description
Please check comment:
https://github.com/flutter/flutter/pull/171040#issuecomment-3014250567.
This PR adds `SemanticsLabelBuilder`, a new utility class for creating
accessible concatenated labels with proper text direction handling and
spacing. Currently, developers manually concatenate semantic labels
using string interpolation, which is error-prone and leads to
accessibility issues like missing spaces, incorrect text direction for
RTL languages. The new builder provides automatic spacing, Unicode
bidirectional text embedding for mixed LTR/RTL content.
### Before (error-prone manual concatenation):
```dart
// Missing space
String label = "$firstName$lastName"; // "JohnDoe"
String englishText = "Welcome";
String arabicText = "مرحبا"; // Arabic "Hello"
// Manual Concatenation (WITHOUT Unicode embedding):
aria-label="Welcome 欢迎 مرحبا स्वागत है to our global app"
// Problem: Arabic does not have proper text direction handling
```
### After (automatic and accessible):
Demo app after the change: https://label-0702.web.app/
```dart
// Automatic spacing and text direction handling
final label = (SemanticsLabelBuilder()
..addPart(firstName)
..addPart(lastName)).build();
// Result: "John Doe" with proper aria-label generation
// SemanticsLabelBuilder (WITH Unicode embedding):
aria-label="Welcome 欢迎 [U+202B]مرحبا[U+202C] स्वागत है to our global app"
// Result: Arabic has proper text direction handling
```
## Issues Fixed
This fixes https://github.com/flutter/flutter/issues/162094.
This PR addresses the general accessibility problem of error-prone
manual label concatenation that affects screen reader users. While not
fixing a specific filed issue, it provides a robust solution for the
common pattern of building complex semantic labels that are critical for
accessibility compliance, particularly for multilingual applications and
complex UI components like contact cards, dashboards, and e-commerce
listings.
## Breaking Changes
No breaking changes were made. This is a purely additive API that
doesn't modify existing behavior or require any migration.
## Key Features Added
- **SemanticsLabelBuilder**: Main builder class for concatenating text
parts
- **Automatic spacing**: Configurable separators with intelligent empty
part handling
- **Text direction support**: Unicode bidirectional embedding for
RTL/LTR mixed content
## Example Usage
```dart
// Basic usage
final label = (SemanticsLabelBuilder()
..addPart('Contact')
..addPart('John Doe')
..addPart('Phone: +1-555-0123')).build();
// Result: "Contact John Doe Phone: +1-555-0123"
// Custom separator
final label = (SemanticsLabelBuilder(separator: ', ')
..addPart('Name: Alice')
..addPart('Status: Online')).build();
// Result: "Name: Alice, Status: Online"
// Multilingual support
final label = (SemanticsLabelBuilder(textDirection: TextDirection.ltr)
..addPart('Welcome', textDirection: TextDirection.ltr)
..addPart('مرحبا', textDirection: TextDirection.rtl)
..addPart('to our app')).build();
// Result: "Welcome مرحبا to our app" (with proper RTL embedding)
```
```
## 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: Mouad Debbar <mouad.debbar@gmail.com>
Reference Link
https://github.com/flutter/flutter/pull/168441#discussion_r2178859272
This PR removes explicit ThemeData(useMaterial3: true) assignments from
test files. Since useMaterial3 now defaults to true in Flutter, these
lines are no longer necessary and can be safely omitted.
**Why?**
- Keeps test code clean and up-to-date with current Flutter defaults.
- Prevents confusion for contributors who may think this setting is
still required.
Expose the focus node of `FocusTraversalGroup` so customers can listen
to focus changes of its descendants.
Fixes https://github.com/flutter/flutter/issues/171516
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
This PR adds the new `changeReportingBehavior` parameter to
`CupertinoDatePicker` and `CupertinoTimerPicker`.
Continuation of https://github.com/flutter/flutter/pull/170202
Fixes https://github.com/flutter/flutter/issues/92644
## 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.
Style: Rename pageBuilder with builder in showCupertinoSheet
fixes: #169831
## 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.
Feat: Add foreground color for cupertino button
fixes: #169507
## 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: Tong Mu <dkwingsmt@users.noreply.github.com>
## Summary
A Custom Device's log reader doesn't do anything, and thus `flutter
attach` will fail to ever find the flutter engine's VM service.
This change adds a new `readLogs` command to the CustomDeviceConfig, and
which allows a custom device to read the logs from the running flutter
app on the actual custom device, and then allow flutter attach to work.
Fixes#170634
## Testing
Created a custom device, and added the following readLogs command in the
`custom_devices.json` file:
```
"readLogs": [
"sshpass",
"-f",
"/home/dvalente/player.txt",
"ssh",
"root@10.0.0.20",
"tail -Fn +1 /opt/log/flutter.log"
]
```
Then, running `flutter attach` works every time.
**Tested the following scenarios:**
* Launched `flutter attach` before app is running on device, and once
app runs, flutter attach succeeds
* Launched `flutter attach` after app is already running on device, and
flutter attach succeeds.
* Used `flutter attach` in Android Studio, and hot reload works just
like any Android device.