-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Feat: Add brightnessOf method for theme #163733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This PR doesn't include implementation of InheritedModel for Theme. |
| return inheritedTheme?.theme.data.brightness ?? MediaQuery.platformBrightnessOf(context); | ||
| } | ||
|
|
||
| /// Retrieves the [Brightness] to use for descendant Cupertino widgets, based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
| /// Retrieves the [Brightness] to use for descendant Cupertino widgets, based | |
| /// Retrieves the [Brightness] to use for descendant Material widgets, based | |
| /// on the value of [ThemeData.brightness] in the given [context]. | |
| /// | |
| /// If no [InheritedTheme] can be found in the given [context], it will fall | |
| /// back to [MediaQueryData.platformBrightness]. | |
| /// | |
| /// Returns null if no valid [InheritedTheme] or [MediaQuery] widgets exist in | |
| /// the ancestry tree. | |
| /// | |
| /// See also: | |
| /// | |
| /// * [ThemeData.brightness], the property that takes precedence over | |
| /// [MediaQueryData.platformBrightness] for descendant Material widgets. | |
| /// * [brightnessOf], which throws if no valid [InheritedTheme] or | |
| /// [MediaQuery] exists, instead of returning null. |
| await tester.pump(const Duration(seconds: 1)); | ||
|
|
||
| expect(Theme.of(tester.element(find.text('menuItem'))).brightness, equals(Brightness.dark)); | ||
| expect(Theme.brightnessOf(tester.element(find.text('menuItem'))), equals(Brightness.dark)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would propose to not do this change in this PR, we can probably do all the ThemeData.brightness changes in a follow up PR, after this one lands. (which probably makes it a bit easier to review)
Instead, I would test the behavior of brightnessOf / maybeBrightnessOf in separate tests:
- brightnessOf returns the correct brightness if only a MediaQuery is provided
- brightnessOf returns the correct brightness if both a MediaQuery & ThemeData are provided
- brightnessOf throws if neither a MediaQuery or ThemeData is provided
- maybeBrightnessOf returns the correct brightness if only a MediaQuery is provided
- maybeBrightnessOf returns the correct brightness if both a MediaQuery & ThemeData are provided
- maybeBrightnessOf returns null if neither a MediaQuery or ThemeData is provided
I will file a follow up issue to do the former sparately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let me create another test which just verify that Theme.brightnessOf works in all scenario
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@navaronbracke I don't think scenario 3 and 6 can be produced, because in testing media query always return platform brightness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these tests I would just pump a widget with the WidgetTester:
- Only pumps a
MediaQuerywidget with aBuilderas child (to get the context for the brightness test) - Pumps both a MediaQuery & a Theme widget, with a
Builderas child - Pumps only a
Builderwidget and never pumps aMediaQueryorThemewidget
Cases 4-6 are variations, but use the other method.
You should be able to give the MediaQuery a custom MediaQueryData, to force the brightness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, MediaQuery takes data as input.
4226de7 to
c2e7da0
Compare
| await tester.pumpWidget( | ||
| MediaQuery( | ||
| data: const MediaQueryData(platformBrightness: Brightness.dark), | ||
| child: Container(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use a SizedBox, instead of a Container to make the tests a little lighter.
| await tester.pumpWidget( | ||
| Theme( | ||
| data: ThemeData(brightness: Brightness.light), | ||
| child: MediaQuery( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the MediaQuery be above the Theme, for consistency with the real widget tree in MaterialApp?
| /// | ||
| /// See also: | ||
| /// | ||
| /// * [ThemeData.brightness], the property takes precedence over |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// * [ThemeData.brightness], the property takes precedence over | |
| /// * [ThemeData.brightness], the property that takes precedence over |
| /// | ||
| /// * [maybeBrightnessOf], which returns null if no valid [InheritedTheme] or | ||
| /// [MediaQuery] exists, instead of throwing. | ||
| /// * [ThemeData.brightness], the property takes precedence over |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// * [ThemeData.brightness], the property takes precedence over | |
| /// * [ThemeData.brightness], the property that takes precedence over |
| /// * [maybeBrightnessOf], which returns null if no valid [InheritedTheme] or | ||
| /// [MediaQuery] exists, instead of throwing. | ||
| /// * [ThemeData.brightness], the property takes precedence over | ||
| /// [MediaQueryData.platformBrightness] for descendant widgets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the mention of Material, since Theme is a Material thing and not under the widgets library.
| /// [MediaQueryData.platformBrightness] for descendant widgets. | |
| /// [MediaQueryData.platformBrightness] for descendant Material widgets. |
| .resolveFrom(context); | ||
| } | ||
|
|
||
| /// Retrieves the [Brightness] to use for descendant widgets, based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the mention of Material, since Theme is a Material thing and not under the widgets library.
| /// Retrieves the [Brightness] to use for descendant widgets, based | |
| /// Retrieves the [Brightness] to use for descendant Material widgets, based |
| return inheritedTheme?.theme.data.brightness ?? MediaQuery.platformBrightnessOf(context); | ||
| } | ||
|
|
||
| /// Retrieves the [Brightness] to use for descendant widgets, based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the mention of Material, since Theme is a Material thing and not under the widgets library.
| /// Retrieves the [Brightness] to use for descendant widgets, based | |
| /// Retrieves the [Brightness] to use for descendant Material widgets, based |
| /// See also: | ||
| /// | ||
| /// * [ThemeData.brightness], the property takes precedence over | ||
| /// [MediaQueryData.platformBrightness] for descendant widgets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the mention of Material, since Theme is a Material thing and not under the widgets library.
| /// [MediaQueryData.platformBrightness] for descendant widgets. | |
| /// [MediaQueryData.platformBrightness] for descendant Material widgets. |
c2e7da0 to
f1770bd
Compare
navaronbracke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor docs correction and a suggestion for some missing tests.
| /// If no [InheritedTheme] can be found in the given [context], or its `brightness` | ||
| /// is null, it will fall back to [MediaQueryData.platformBrightness]. | ||
| /// | ||
| /// Throws an exception if no valid [InheritedTheme] or [MediaQuery] widgets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// Throws an exception if no valid [InheritedTheme] or [MediaQuery] widgets |
I had a look at the implementation of https://api.flutter.dev/flutter/widgets/MediaQuery/platformBrightnessOf.html
and it returns Brightness.light instead of throwing if there is no MediaQuery.
So you can remove the phrase that says it throws.
3cfa06b to
b6c93e8
Compare
navaronbracke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor docs adjustments, to match the actual behavior of the method that is used, along with a clarification for one test.
| /// See also: | ||
| /// | ||
| /// * [maybeBrightnessOf], which returns null if no valid [InheritedTheme] or | ||
| /// [MediaQuery] exists, instead of throwing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since platformBrightnessOf does not throw, but returns a default, I think we can tweak the wording here.
| /// [MediaQuery] exists, instead of throwing. | |
| /// [MediaQuery] exists. |
| /// If no [InheritedTheme] or [MediaQuery] can be found in the given [context], it will | ||
| /// return null. | ||
| /// | ||
| /// Returns null if no valid [InheritedTheme] or [MediaQuery] widgets exist in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this phrase? Currently it says returns null twice
| /// | ||
| /// * [ThemeData.brightness], the property that takes precedence over | ||
| /// [MediaQueryData.platformBrightness] for descendant Material widgets. | ||
| /// * [brightnessOf], which throws if no valid [InheritedTheme] or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same tweak here, since that method does not throw.
| /// * [brightnessOf], which throws if no valid [InheritedTheme] or | |
| /// * [brightnessOf], which returns a default value if no valid [InheritedTheme] or |
| testWidgets('returns Brightness.light when no theme or media query is present', ( | ||
| WidgetTester tester, | ||
| ) async { | ||
| await tester.pumpWidget(const SizedBox()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to prevent the View from adding the MediaQuery here, otherwise there is an implicit MediaQuery
| await tester.pumpWidget(const SizedBox()); | |
| // Prevent the implicitly added View from adding a MediaQuery | |
| await tester.pumpWidget( | |
| RawView(view: FakeFlutterView(tester.view, viewId: 77), child: const SizedBox()), | |
| wrapWithView: false, | |
| ); |
b6c93e8 to
26f49a7
Compare
|
@rkishan516 While to me this PR looks good now, I will have to defer to people on the framework team for a review / explicit approval. So you will have to be patient a little :) See https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#when for more info on the review process. |
Sure and Thanks for helping @navaronbracke. |
95dd5a5 to
227f414
Compare
QuncCccccc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use Theme.of(context).brightness to detect the brightness?
|
That is how you would do this today. However, this PR aims to make it explicit, using a named method, and is a step towards eventually making Theme an InheritedModel. The latter is the main reasoning behind this change. |
|
@navaronbracke I'm not familiar with this work, but is there an issue tracking our progress (and discussions, if any) towards making |
|
@nate-thegrate made a design doc that talks about this a little in https://docs.google.com/document/d/1MfU6gkgIgXCxa5E25sPYuAP5Bmgehyl3Hk7yDH24zl0/edit?tab=t.0 |
|
I've asked @MitchellGoodwin and it seems the conversation didn't reached a point were a decision was made. Although I agree with the motivation of the work, I think it'd be better not to move forward until we have agreed on the exact design and plan. If you would like to drive this project, you can start by writing a more detailed design doc with thorough planning and introduction, and we can seek comments or even host a Dash forum for discussion. |
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions) flutter/flutter@05b5e79...a0b1b32 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342) 2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296) 2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654) 2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437) 2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321) 2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211) 2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037) 2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301) 2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199) 2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293) 2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299) 2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165) 2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164) 2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277) 2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283) 2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148) 2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690) 2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884) 2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780) 2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926) 2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733) 2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964) 2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260) 2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205) 2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937) 2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178) 2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236) 2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose ...
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions) flutter/flutter@05b5e79...a0b1b32 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342) 2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296) 2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654) 2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437) 2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321) 2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211) 2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037) 2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301) 2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199) 2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293) 2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299) 2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165) 2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164) 2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277) 2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283) 2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148) 2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690) 2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884) 2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780) 2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926) 2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733) 2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964) 2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260) 2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205) 2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937) 2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178) 2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236) 2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose ...
Roll Flutter from 05b5e7910544 to a0b1b3253416 (37 revisions) flutter/flutter@05b5e79...a0b1b32 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342) 2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296) 2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654) 2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437) 2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321) 2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211) 2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037) 2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301) 2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199) 2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293) 2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299) 2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165) 2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164) 2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277) 2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283) 2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148) 2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690) 2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884) 2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780) 2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926) 2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733) 2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964) 2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260) 2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205) 2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937) 2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178) 2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236) 2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose ...
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions) flutter/flutter@05b5e79...a0b1b32 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342) 2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296) 2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654) 2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437) 2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321) 2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211) 2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037) 2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301) 2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199) 2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293) 2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299) 2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165) 2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164) 2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277) 2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283) 2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148) 2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690) 2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884) 2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780) 2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926) 2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733) 2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964) 2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260) 2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205) 2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937) 2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178) 2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236) 2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose ...
Feat: Add brightnessOf method for theme fixes: flutter#163393 ## 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.
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions) flutter/flutter@05b5e79...a0b1b32 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342) 2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296) 2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654) 2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437) 2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321) 2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211) 2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037) 2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301) 2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199) 2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293) 2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299) 2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165) 2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164) 2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277) 2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283) 2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148) 2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690) 2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884) 2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780) 2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926) 2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733) 2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964) 2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260) 2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205) 2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937) 2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178) 2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236) 2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose ...
Roll Flutter from 05b5e79 to a0b1b32 (37 revisions) flutter/flutter@05b5e79...a0b1b32 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from b4d374ec59ec to 4e1f02bc704f (2 revisions) (flutter/flutter#166342) 2025-04-01 15619084+vashworth@users.noreply.github.com Trim any text before osascript JSON response (flutter/flutter#166296) 2025-04-01 benthillerkus@gmail.com [Gen-l10n] Add `Message.resourceId` and `locale` to all `L10nException` error messages (flutter/flutter#163654) 2025-04-01 me@nils.re Add `--ignore-timeouts` flag for `flutter test` command (flutter/flutter#164437) 2025-04-01 stuartmorgan@google.com Update TESTOWNERS username (flutter/flutter#166191) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 4b07443e6071 to 52cbb917fffd (4 revisions) (flutter/flutter#166329) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 6b07a09cbd2d to b4d374ec59ec (2 revisions) (flutter/flutter#166321) 2025-04-01 737941+loic-sharma@users.noreply.github.com [tool] Improve using project files in build targets (flutter/flutter#166211) 2025-04-01 robert.ancell@canonical.com Rename FlRenderer to FlCompositorOpenGL (flutter/flutter#166037) 2025-04-01 kevmoo@users.noreply.github.com [engine, web_ui] Fix instances of library_private_types_in_public_api (flutter/flutter#166156) 2025-04-01 engine-flutter-autoroll@skia.org Roll Dart SDK from 509faa921c95 to 6b07a09cbd2d (1 revision) (flutter/flutter#166301) 2025-04-01 jonahwilliams@google.com [Impeller] small cpu perf for text contents. (flutter/flutter#166199) 2025-04-01 jonahwilliams@google.com [android_engine_test] disable old HC mode tests. (flutter/flutter#166293) 2025-04-01 30870216+gaaclarke@users.noreply.github.com [impeller] fixes diagonal antialiased lines (flutter/flutter#166298) 2025-04-01 engine-flutter-autoroll@skia.org Roll Skia from 5f262bd2cbb4 to 4b07443e6071 (10 revisions) (flutter/flutter#166299) 2025-03-31 flar@google.com [Impeller] Directly tessellate conics to linear path segments (flutter/flutter#166165) 2025-03-31 737941+loic-sharma@users.noreply.github.com [tool] Don't write the .flutter-plugins-dependencies file if it is unchanged (flutter/flutter#166164) 2025-03-31 34871572+gmackall@users.noreply.github.com Move `.cxx` directory out of `android/app` (flutter/flutter#166277) 2025-03-31 4nahom@gmail.com Fix typo in carousel.dart (flutter/flutter#164727) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fa06710bb6 to 509faa921c95 (1 revision) (flutter/flutter#166283) 2025-03-31 conner@emerssso.com Public nodes needing paint or layout (flutter/flutter#166148) 2025-03-31 benthillerkus@gmail.com [Gen-l10n] Infer placeholder types on both templates and localizations (flutter/flutter#163690) 2025-03-31 koji.wakamiya@gmail.com [Engine][iOS] Cancel animation when recieved `UIKeyboardWillHideNotification` with duration 0.0 (flutter/flutter#164884) 2025-03-31 51209748+gbbosak@users.noreply.github.com [fuchsia] Remove explicit LogSink and InspectSink routing and use dictionaries instead (flutter/flutter#162780) 2025-03-31 jessiewong401@gmail.com Updated to latest AVD to Support Android 16 (API 36) (flutter/flutter#165926) 2025-03-31 34465683+rkishan516@users.noreply.github.com Feat: Add brightnessOf method for theme (flutter/flutter#163733) 2025-03-31 fluttergithubbot@gmail.com Marks Linux_mokey new_gallery__crane_perf to be flaky (flutter/flutter#165964) 2025-03-31 bkonyi@google.com [ Tool ] Correctly select entrypoint target for web build from positional argument list (flutter/flutter#166260) 2025-03-31 jonahwilliams@google.com [Impeller] remove validation warning ignores. (flutter/flutter#166205) 2025-03-31 jonahwilliams@google.com [Impeller] handle shader ordering bug on macOS. (flutter/flutter#165937) 2025-03-31 737941+loic-sharma@users.noreply.github.com Fix CODEOWNERS for the iOS review team (flutter/flutter#166178) 2025-03-31 bkonyi@google.com Remove `<meta content="IE=Edge" http-equiv="X-UA-Compatible">` (flutter/flutter#166252) 2025-03-31 engine-flutter-autoroll@skia.org Roll Dart SDK from b9c35e05feb5 to c5fa06710bb6 (1 revision) (flutter/flutter#166251) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 418c68ea5ccb to 5f262bd2cbb4 (2 revisions) (flutter/flutter#166244) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from b6a3bbd1d153 to 418c68ea5ccb (1 revision) (flutter/flutter#166236) 2025-03-31 jonahwilliams@google.com [Impeller] fix min filter for GL external textures. (flutter/flutter#166224) 2025-03-31 engine-flutter-autoroll@skia.org Roll Skia from 10f4cf9a817d to b6a3bbd1d153 (13 revisions) (flutter/flutter#166231) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose ...
Feat: Add brightnessOf method for theme fixes: flutter#163393 ## 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 brightnessOf method for theme
fixes: #163393
Pre-launch Checklist
///).