Update tokens to v2.3.5 (#145356)
* Updated the Material Design tokens to v2.3.5 * Linear and circular progress indicator token sets are deprecated in v0.207. The `md.com.progress-indicator` token set was created and should be used instead. * tokens is now using [semantic versioning](https://semver.org/) ï¼Thanks @guidezpl for reminding:) ) * ~Fixes #128877. The default text style is updated to `bodyLarge` now:)~ Added TODOs for the label text style of `PopupMenuButton`. Will create a separate PR because this change breaks Google testing.
This commit is contained in:
@@ -1074,6 +1074,9 @@ class _CircularProgressIndicatorDefaultsM3 extends ProgressIndicatorThemeData {
|
||||
|
||||
@override
|
||||
Color get color => _colors.primary;
|
||||
|
||||
@override
|
||||
Color get circularTrackColor => _colors.secondaryContainer;
|
||||
}
|
||||
|
||||
class _LinearProgressIndicatorDefaultsM3 extends ProgressIndicatorThemeData {
|
||||
@@ -1086,7 +1089,7 @@ class _LinearProgressIndicatorDefaultsM3 extends ProgressIndicatorThemeData {
|
||||
Color get color => _colors.primary;
|
||||
|
||||
@override
|
||||
Color get linearTrackColor => _colors.surfaceContainerHighest;
|
||||
Color get linearTrackColor => _colors.secondaryContainer;
|
||||
|
||||
@override
|
||||
double get linearMinHeight => 4.0;
|
||||
|
||||
@@ -1952,6 +1952,7 @@ class _SliderDefaultsM2 extends SliderThemeData {
|
||||
SliderComponentShape? get valueIndicatorShape => const RectangularSliderValueIndicatorShape();
|
||||
}
|
||||
|
||||
// TODO(quncheng): Update M3 defaults to match the latest specs.
|
||||
// BEGIN GENERATED TOKEN PROPERTIES - Slider
|
||||
|
||||
// Do not edit by hand. The code between the "BEGIN GENERATED" and
|
||||
|
||||
@@ -228,6 +228,27 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('LinearProgressIndicator with colors', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Center(
|
||||
child: SizedBox(
|
||||
width: 200.0,
|
||||
child: LinearProgressIndicator(
|
||||
value: 0.25,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Defaults.
|
||||
expect(
|
||||
find.byType(LinearProgressIndicator),
|
||||
paints
|
||||
..rect(rect: const Rect.fromLTRB(0.0, 0.0, 200.0, 4.0), color: theme.colorScheme.secondaryContainer)
|
||||
..rect(rect: const Rect.fromLTRB(0.0, 0.0, 50.0, 4.0), color: theme.colorScheme.primary),
|
||||
);
|
||||
|
||||
// With valueColor & color provided
|
||||
await tester.pumpWidget(
|
||||
Theme(
|
||||
|
||||
Reference in New Issue
Block a user