- 07 Aug, 2023 1 commit
-
-
Kate Lovett authored
Fixes https://github.com/flutter/flutter/issues/59413 This relocates `mock_canvas.dart` and `recording_canvas.dart` from `flutter/test/rendering` to `flutter_test`. The testing functionality afforded by mock_canvas should be available to everyone, not just the framework. :) mock_canvas.dart needed a bit of cleanup - things like formatting and super parameters.
-
- 18 Jul, 2023 2 commits
-
-
Taha Tesser authored
Updated unit tests for `AppBar` and `AppBarTheme` to have M2 and M3 versions. More info in https://github.com/flutter/flutter/issues/127064
-
Taha Tesser authored
fixes [[Material3] AppBar does not respect `foregroundColor` or `iconTheme` for leading and actions in some cases](https://github.com/flutter/flutter/issues/130485) ### Description - Fix `Colors.white` not applied in dark mode - Add regression tests - make `iconStyle` private for consistency ### Before ![Screenshot 2023-07-14 at 18 40 58](https://github.com/flutter/flutter/assets/48603081/a6caffd6-d9a1-407a-aea7-c30047bfe7c7) ### After ![Screenshot 2023-07-14 at 18 41 04](https://github.com/flutter/flutter/assets/48603081/f864da7a-2ff8-46a4-8927-591e50050502)
-
- 17 Jul, 2023 1 commit
-
-
LongCatIsLooong authored
Deprecate `textScaleFactor` in favor of `textScaler`, in preparation for Android 14 [Non-linear font scaling to 200%](https://developer.android.com/about/versions/14/features#non-linear-font-scaling). The `TextScaler` class can be moved to `dart:ui` in the future, if we decide to use the Android platform API or AndroidX to get the scaling curve instead of hard coding the curve in the framework. I haven't put the Flutter version in the deprecation message so the analyzer checks are failing. Will do so after I finish the migration guide. **Why `TextScaler.textScaleFactor`** The author of a `TextScaler` subclass should provide a fallback `textScaleFactor`. By making `TextScaler` also contain the `textScaleFactor` information it also makes it easier to migrate: if a widget overrides `MediaQueryData.textScaler` in the tree, for unmigrated widgets in the subtree it would also have to override `MediaQueryData.textScaleFactor`, and that makes it difficult to remove `MediaQueryData.textScaleFactor` in the future. ## A full list of affected APIs in this PR Deprecated: The method/getter/setter/argument is annotated with a `@Deprecated()` annotation in this PR, and the caller should replace it with `textScaler` instead. Unless otherwise specified there will be a Flutter fix available to help with migration but it's still recommended to migrate case-by-case. **Replaced**: The method this `textScaleFactor` argument belongs to is rarely called directly by user code and is not overridden by any of the registered custom tests, so the argument is directly replaced by `TextScaler`. **To Be Deprecated**: The method/getter/setter/argument can't be deprecated in this PR because a registered customer test depends on it and a Flutter fix isn't available (or the test was run without applying flutter fixes first). This method/getter/setter/argument will be deprecated in a followup PR once the registered test is migrated. ### `Painting` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `InlineSpan.build({ double textScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getParagraphStyle({ double TextScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getTextStyle({ double TextScaleFactor = 1.0 })` argument| Deprecated | Can't replace: https://github.com/superlistapp/super_editor/blob/c47fd38dca4b7f43611690913b551a1773c563d7/super_editor/lib/src/infrastructure/super_textfield/desktop/desktop_textfield.dart#L1903-L1905| | `TextPainter({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `TextPainter.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `TextPainter.computeWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | | `TextPainter.computeMaxIntrinsicWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | ### `Rendering` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `RenderEditable({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderEditable.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `RenderParagraph({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderParagraph.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | ### `Widgets` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `MediaQueryData({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/test/text_scale_factor_test.dart#LL39C21-L39C35 | | `MediaQueryData.textScaleFactor` getter | Deprecated | | | `MediaQueryData.copyWith({ double? TextScaleFactor })` argument | Deprecated | | | `MediaQuery.maybeTextScaleFactorOf(BuildContext context)` static method | Deprecated | No Flutter Fix, not expressible yet | | `MediaQuery.textScaleFactorOf(BuildContext context)` static method | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/_functions_io.dart#L68-L70, No Flutter Fix, not expressible yet | | `RichText({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843 | | `RichText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away| | `Text({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/914d120da12fba458c020210727831c31bd71041/packages/rfw/lib/src/flutter/core_widgets.dart#L647 , No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `Text.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `Text.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | | `EditableText({ double? TextScaleFactor = 1.0 })` constructor argument | Deprecated | No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `EditableText.textScaleFactor` getter | Deprecated | | ### `Material` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `SelectableText({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843, No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `SelectableText.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `SelectableText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | A lot of material widgets (`Slider`, `RangeSlider`, `TimePicker`, and different types of buttons) also change their layout based on `textScaleFactor`. These need to be handled in a case-by-case fashion and will be migrated in follow-up PRs.
-
- 13 Jun, 2023 1 commit
-
-
Qun Cheng authored
-
- 06 Jun, 2023 1 commit
-
-
LongCatIsLooong authored
I am trying to remove `textScaleFactor`-dependent logic from the framework since it's likely going to be deprecated, hopefully the original logic isn't from the material spec. I stole the sample code from https://github.com/flutter/flutter/pull/125038 and here are the screenshots (`textScaleFactor = 3.0`). Internal Tests: **no relevant test failures** | Medium | Large | | --------------- | --------------- | | ![flutter_01](https://github.com/flutter/flutter/assets/31859944/515226d9-716f-470a-b794-5fd14b957d36) | ![flutter_03](https://github.com/flutter/flutter/assets/31859944/475c421d-550e-4d02-be08-709b63b63011) |
-
- 05 Jun, 2023 1 commit
-
-
Kate Lovett authored
The deprecated `[RawScrollbar/Scrollbar/CupertinoScrollbar/ScrollbarThemeData].isAlwaysShown` has expired and is removed in thi PR. Also, `Scrollbar.hoverThickness` is also removed after having expired. The replacement for `isAlwaysShown` is `thumbVisibility`. This deprecation was introduced in #96957. The name change came from new behaviors like a track that is conditionally visible. Since the original API only referred to the thumb, the name was changed to reflect this intention. This change is supported by dart fix. â The replacement for `hoverThickness` is `ScrollbarThemeData.thickness`, which is a MaterialStateProperty that allows for the thickness to respond to multiple states including hover. This deprecation was introduced in #97173. This change is not supported by dart fix. ð Part of https://github.com/flutter/flutter/issues/127042
-
- 30 May, 2023 1 commit
-
-
Taha Tesser authored
fixes https://github.com/flutter/flutter/issues/127795
-
- 26 May, 2023 2 commits
-
-
Greg Spencer authored
## Description Removes references to `ThemeData.primaryColorBrightness`, deprecated in https://github.com/flutter/flutter/pull/93396 and subject to remove now because of our [deprecation policy](https://github.com/flutter/flutter/wiki/Tree-hygiene#deprecations). ## Related PRs - https://github.com/flutter/flutter/pull/93396 ## Tests - Removed unneeded tests, removed references.
-
LongCatIsLooong authored
To opt-in, run the tests with: `SKPARAGRAPH_REMOVE_ROUNDING_HACK=1 flutter test --dart-define=SKPARAGRAPH_REMOVE_ROUNDING_HACK=1 ` Migration plans: 1. Turn the flags on in CI, migrate customer tests if needed 1. Migrate internal customers 2. Remove the flag from skparagraph. Remove the framework flag with a manual engine roll. Also fixes https://github.com/flutter/flutter/issues/52038
-
- 04 May, 2023 1 commit
-
-
chunhtai authored
fixes https://github.com/flutter/flutter/issues/80256
-
- 25 Apr, 2023 1 commit
-
-
Taha Tesser authored
fixes https://github.com/flutter/flutter/issues/114340 <details> <summary>code sample</summary> ```dart import 'package:flutter/material.dart'; /// Flutter code sample for [SliverAppBar.medium]. void main() { runApp(const AppBarMediumApp()); } class AppBarMediumApp extends StatelessWidget { const AppBarMediumApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( useMaterial3: true, ), home: MediaQuery( data: MediaQuery.of(context).copyWith(textScaleFactor: 3.0), child: Material( child: CustomScrollView( slivers: <Widget>[ SliverAppBar.medium( leading: IconButton(icon: const Icon(Icons.menu), onPressed: () {}), title: const Text('Medium App Bar'), actions: <Widget>[ IconButton(icon: const Icon(Icons.more_vert), onPressed: () {}), ], ), // SliverAppBar.large( // leading: // IconButton(icon: const Icon(Icons.menu), onPressed: () {}), // title: const Text('Large App Bar'), // actions: <Widget>[ // IconButton( // icon: const Icon(Icons.more_vert), onPressed: () {}), // ], // ), // Just some content big enough to have something to scroll. SliverToBoxAdapter( child: Card( child: SizedBox( height: 1200, child: Padding( padding: const EdgeInsets.fromLTRB(8, 100, 8, 100), child: Text( 'Here be scrolling content...', style: Theme.of(context).textTheme.headlineSmall, ), ), ), ), ), ], ), ), ), ); } } ``` </details> ### Before | Medium App Bar - `textScaleFactor: 3.0` | Large App Bar - `textScaleFactor.30` | | --------------- | --------------- | | <img src="https://user-images.githubusercontent.com/48603081/232815191-ab42523b-d710-4c93-a889-e9c92ca472c8.png" height="450" /> | <img src="https://user-images.githubusercontent.com/48603081/232815232-104c208d-f1dd-404e-9218-5dfb61244d56.png" height="450" /> | ### After | Medium App Bar - `textScaleFactor: 3.0` | Large App Bar - `textScaleFactor.30` | | --------------- | --------------- | | <img src="https://user-images.githubusercontent.com/48603081/232815733-8b8af94f-197f-427a-bbb9-bc6cd0173658.png" height="450" /> | <img src="https://user-images.githubusercontent.com/48603081/232815758-2c336d14-085b-4e91-8b93-748a40822ea6.png" height="450" /> |
-
- 13 Apr, 2023 1 commit
-
-
Taha Tesser authored
Refactor `SliverAppBar.medium` & `SliverAppBar.large` to fix several issues
-
- 05 Apr, 2023 1 commit
-
-
Kate Lovett authored
Revert "Fix scrolling in the `Drawer` and `NavigationDrawer` triggers AppBar's scrolledUnderElevation" (#124226) Revert "Fix scrolling in the `Drawer` and `NavigationDrawer` triggers AppBar's scrolledUnderElevation"
-
- 29 Mar, 2023 1 commit
-
-
Taha Tesser authored
Fix scrolling in the `Drawer` and `NavigationDrawer` triggers AppBar's scrolledUnderElevation (#122600) Fix scrolling in the `Drawer` and `NavigationDrawer` triggers AppBar's scrolledUnderElevation
-
- 28 Feb, 2023 1 commit
-
-
Kate Lovett authored
Fix AppBar scrolled under for 2D scrolling
-
- 23 Feb, 2023 1 commit
-
-
Taha Tesser authored
Fix `SliverAppBar.medium` & `SliverAppBar.large` title overlap with leading/actions widgets, leading width, and title spacing (#120780) * Fix `SliverAppBar.medium` & `SliverAppBar.large` title overlap with leading/actions widgets, leading width, and title spacing * Add `titleSpacing` theme tests and consolidate multiple tests for the same widgets
-
- 15 Feb, 2023 1 commit
-
-
LongCatIsLooong authored
-
- 02 Feb, 2023 1 commit
-
-
Michael Goderbauer authored
* Make Flex,Row,Column const for real * dart fix --apply * fix snippets * fix integration test * add comment
-
- 18 Jan, 2023 1 commit
-
-
Eilidh Southren authored
* theme override fix * add conditional centering
-
- 12 Jan, 2023 1 commit
-
-
Qun Cheng authored
IconButtonTheme should be overridden by the AppBar/AppBarTheme's iconTheme and actionsIconTheme (#118216)
-
- 20 Dec, 2022 1 commit
-
-
Michael Goderbauer authored
* Enable lint * note about discarded_futures * note about use_decorated_box * update note on require_trailing_commas
-
- 13 Dec, 2022 1 commit
-
-
Daniel Iglesia authored
* Add AppBar.forceMaterialTransparency (#101248) Allows gestures to reach widgets beneath the AppBar (when Scaffold.extendBodyBehindAppBar is true).
-
- 07 Nov, 2022 1 commit
-
-
Bruno Leroux authored
* Use upper AnnotatedRegion properties when no bottom one found (and vice versa) * Update comments Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
-
- 31 Oct, 2022 1 commit
-
-
Greg Spencer authored
-
- 06 Oct, 2022 1 commit
-
-
Ari Weiland authored
Remove NavigationToolbar condition that leading widget cannot be larger than 1/3 the total space available. (#112548)
-
- 01 Sep, 2022 1 commit
-
-
Qun Cheng authored
-
- 31 Aug, 2022 1 commit
-
-
Qun Cheng authored
-
- 23 Aug, 2022 2 commits
-
- 22 Aug, 2022 1 commit
-
-
Qun Cheng authored
-
- 18 Aug, 2022 1 commit
-
-
Qun Cheng authored
* Revert "Revert "Set `IconButton.visualDensity` default to `VisualDensity.standard` (#109349)" (#109421)" Co-authored-by: Qun Cheng <quncheng@google.com>
-
- 17 Aug, 2022 1 commit
-
-
Bernardo Ferrari authored
-
- 11 Aug, 2022 2 commits
-
-
Qun Cheng authored
* Set IconButton's visualDensity to standard Co-authored-by: Qun Cheng <quncheng@google.com>
- 03 Aug, 2022 1 commit
-
-
Qun Cheng authored
* Created IconButtonTheme and apply it to IconButton
-
- 25 May, 2022 1 commit
-
-
Pierre-Louis authored
* Use `curly_braces_in_flow_control_structures` for `material` * include test/material * add back removed comments
-
- 24 May, 2022 1 commit
-
- 20 May, 2022 1 commit
-
-
Darren Austin authored
* Add support for M3 AppBar 'Medium' and 'Large' types. * Updates from review feedback. * Updated from review feedback.
-
- 18 May, 2022 1 commit
-
-
Taha Tesser authored
-