-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listdependency: materialMaterial design team may need to help usMaterial design team may need to help usf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to reproduce
New Slider design uses stop indicator color and size for the tick marks in the discrete Slider. However, the new tokens use same color for the active and inactive stop indicator.
flutter/dev/tools/gen_defaults/data/slider.json
Lines 39 to 40 in 9b84701
| "md.comp.slider.stop-indicator.color": "secondaryContainer", | |
| "md.comp.slider.stop-indicator.color-selected": "secondaryContainer", |
If we apply this as is then we'll get inactive tick marks with the same color as inactive track color thus rendering them invisible.
Incorrect
Color? get inactiveTickMarkColor => _colors.secondaryContainer;
Corrected
Color? get inactiveTickMarkColor => _colors.primary;
This also seems incorrect in the web specs
Expected results
Correct token
Actual results
Incorrect token
Code sample
Code sample
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
double _value = 5.0;
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Slider(
value: _value,
divisions: 10,
// ignore: avoid_redundant_argument_values
min: 0,
max: 10,
onChanged: (double value) {
setState(() {
_value = value;
});
},
),
),
);
}
}
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
~
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listdependency: materialMaterial design team may need to help usMaterial design team may need to help usf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team