Fixes#153694.
Previously, when state was updated, the updateRenderObject method incorrectly assigned itemExtent to renderObject.minExtent, which unintentionally overrode the intended default behavior.
Makes the Flutter Gradle Plugin apply the `FlutterExtension` (the class that vends `flutter.minSdkVersion`, etc) to Flutter plugins.
This allows plugin authors to use `flutter.compileSdkVersion` and the like in plugin `build.gradle` files.
Doesn't use it in templates yet - holding off till we can see how this works in the plugins repo (which will sadly have to wait till this makes the next stable ð¢ )
The most common use case to lookup a `ThemeData` instance using `Theme.of(context)` is to access either the `ColorScheme`, the `TextTheme`, or both.
Before this change:
```dart
final colors = Theme.of(context).colorScheme;
final textTheme = Theme.of(context).textTheme;
final primaryTextTheme = Theme.of(context).primaryTextTheme;
```
or
```dart
final ThemeData(
:colorScheme,
:textTheme,
:primaryTextTheme,
) = Theme.of(context);
```
After this change:
```dart
final colors = ColorScheme.of(context);
final textTheme = TextTheme.of(context);
final primaryTextTheme = TextTheme.primaryOf(context);
```
### Primary Changes
This PR adds static `of` convenience methods to `ColorScheme` and `TextTheme` that delegate to the `ThemeData`'s respective properties. The methods added are:
* `ColorScheme.of(context)` that returns `Theme.of(context).colorScheme`.
* `TextTheme.of(context)` that returns `Theme.of(context).textTheme`.
* `TextTheme.primaryOf(context)` that returns `Theme.of(context).primaryTextTheme`.
### Side-effects
To allow the above changes to function, this PR adds:
* A `theme.dart` import to `color_scheme.dart` to access to `Theme`.
* A `theme.dart` import to `text_theme.dart` to access to `Theme`.
* A `package:flutter/widgets.dart` import to `text_theme.dart` to access `BuildContext`.
* The above import allowed getting rid of the same `@docImport` from `text_theme.dart`.
### Documentation updates
This PR also updates the following documentation elements:
* Adds docs to the newly added members.
* Updates `TextTheme`'s docs to instruct using `TextTheme.of(context)` instead of `Theme.of(context).textTheme`.
* Updates `Theme.of` to add a "See also" section to `ColorScheme.of` and `TextTheme.of` since these use cases are among the most common ones for `Theme.of(context)`.
Fixes#72201.
This PR is to update the token version to v6.1.
* This version fixes https://github.com/flutter/flutter/issues/153271
* Change the chip default border color from `ColorScheme.outline` to `ColorScheme.outlineVariant`. The Chips' border color is softened to improve visual hierarchy between chips and buttons
This pull request enhances the documentation for the ResizeImage widget to provide clearer guidance on the use of the `width` and `height` parameters.
Fixes#136508
Added function and result identifiers into the RawAutocomplete onChangedField method, now the options value will not be updated if the data is from an optionsBuilder call older than the last call which updated the options
*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.*
Issue #150774 is fixed by this PR
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
This PR makes a notched rectangle method a bit more readable.
- The circular notched rectangle's `getOuterPath()` method no longer
uses any null-asserts.
- It also used to have 2 variables (`r` and `notchRadius`) that held the
same value, but that's no longer the case.
Refresh Indicator Elevation:
- Added elevation to the refresh indicator using elevation attribute.
- This change improves the indicator's visibility against various background colors and enhances overall UI consistency.
- If we want to get rid of shadow effect from the indicator itself.
The refresh indicator did not provide the control over depth of the progress indicator. This change addresses that issue by adding elevation to the indicator, creating a subtle depth effect that makes it more visually prominent and provides better feedback to the user.
No breaking changes.
| Before | After |
| --- | --- |
|  |  |
Pre-launch Checklist
Fixes a bug where the app would exit on a back gesture when there were still routes in the navigation stack after returning to the app from a notification.
fixes https://github.com/flutter/flutter/issues/120083
Description
This PR addresses the following issues:
- Resolves the unexpected scrolledUnderElevation trigger that occurs when scrolling within the Drawer and NavigationDrawer.
So, uhm, 2 years ago in https://github.com/flutter/flutter/pull/116429 we introduced this concept of a lookup boundary to hide certain InheritedWidgets in widget subtrees who belong to a different render tree than the InheritedWidget itself. This is for example needed for the Material widget: Buttons reach out to their Material ancestor to draw ink splashes on its associated render object. This only produces the desired effect if the button render object is a descendant of the Material render object (the two need to be in the same render tree). Overlay widgets have a similar problem.
Lookup boundaries were specifically designed for multi view support, where a sub view would be powered by a separate and independent render tree. Ergo, widgets in the sub view shouldn't see these InheritedWidgets if they are part of the parent view. After all, it would be strange if clicking on a button in a subview draws the ink splash effect into the parent view. Unfortunately, we (and by that I really mean I) forgot to put a LayoutBoundary into the relevant multi view widgets when those were introduced in https://github.com/flutter/flutter/pull/125003. This PR addresses that by wrapping the `ViewAnchor.view` child in a LookupBoundary so that its subtree (which bootstraps a separate render tree) cannot see these InheritedWidgets in the parent view.
`DartDevelopmentServiceLauncher` was created to share the DDS launch
logic from flutter_tools with other Dart tooling.
---------
Co-authored-by: Andrew Kolos <andrewrkolos@gmail.com>
Catches gradle error and throws a helpful error message that indicates
an incompatability between Java and AGP versions and how to fix the
issue.
Related issue:
[128524](https://github.com/flutter/flutter/issues/128524)
## 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.
Native libraries that are contributed by native asset builders can depend on each other. For macOS and iOS, native libraries are repackaged into Frameworks, which renders install names that have been written into dependent libraries invalid.
With this change, a mapping between old and new install names is maintained, and install names in dependent libraries are rewritten as a final step.
Related to https://github.com/dart-lang/native/issues/190
This regression is due to the fact that `animationController.isAnimating` and `animationController.status.isAnimating` sometimes return opposite values.
This PR implements & tests the bugfix, and also adds documentation to explain this behavior.
<br>
fixes https://github.com/flutter/flutter/issues/153851
cc @azeunkn0wn @huycozy
Iâve added a comment document for the `fontFamily` property of `IconData`. The purpose of this is to provide developers with a hint when importing a custom icon. It only includes the change made in the comment.
The original issue was:
[154144](https://github.com/flutter/flutter/issues/154144)
It was marked as closed so I created a new issues for proposal:
Fixes#154149
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
When you change the `initialValue` of a `TextFormField`, it will not trigger a widget rebuild, which is the intended behavior. This PR is meant to clarify that. https://github.com/flutter/flutter/issues/152816
This is a follow up on https://github.com/flutter/flutter/pull/152526
1. Make changes with an additional parameter ( bool internalAddSemanticForOnTap = false) (https://github.com/flutter/flutter/pull/152526 )
2. Send regular CLs in google3 to pass internalAddSemanticForOnTap: true, and update the tests / text goldens 3. accordingly. g3 fix sent: cl/661353802
3. Send a PR to flip the default value to true. (This PR)
4. Send CLs internally to remove internalAddSemanticForOnTap: true.
5. Send another PR to remove the now-redundant internalAddSemanticForOnTap flag.
(<----This PR is step 3)
Make sure `usesUnsupportedDependencyVersions` property exists before checking it in the Flutter Gradle plugin.
Related to: https://github.com/flutter/flutter/issues/153668 (doesn't fix, will need to cherry pick to fix).
The choice screen is irrelevant when debugging apps locally. `flutter run` creates a separate user profile for testing only. It doesn't touch users' browser settings.
Fixes https://github.com/flutter/flutter/issues/153928
Fixes https://github.com/flutter/flutter/issues/153972 (unless the cause of https://github.com/flutter/flutter/issues/153064#issuecomment-2305662791 happens to also prevent this fix from working).
In this PR, I've looked for all non-test call sites of `ChromeConnection.getTabs` and made sure are all wrapped in `try` blocks that handle `IOException` (`HttpException` is what we see in crash reporting, but I figure any `IOException` might as well be the same for all intents and purposes).
I plan on cherry-picking this the stable branch.