File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
dev/tools/gen_defaults/lib Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,19 @@ class _${blockName}DefaultsM3 extends SwitchThemeData {
8585 });
8686 }
8787
88+ @override
89+ MaterialStateProperty<Color?> get trackOutlineColor {
90+ return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
91+ if (states.contains(MaterialState.selected)) {
92+ return Colors.transparent;
93+ }
94+ if (states.contains(MaterialState.disabled)) {
95+ return ${componentColor ('md.comp.switch.disabled.unselected.track.outline' )}.withOpacity(${opacity ('md.comp.switch.disabled.track.opacity' )});
96+ }
97+ return ${componentColor ('md.comp.switch.unselected.track.outline' )};
98+ });
99+ }
100+
88101 @override
89102 MaterialStateProperty<Color?> get overlayColor {
90103 return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
@@ -187,19 +200,6 @@ class _SwitchConfigM3 with _SwitchConfig {
187200 @override
188201 double get trackHeight => ${tokens ['md.comp.switch.track.height' ]};
189202
190- @override
191- MaterialStateProperty<Color?> get trackOutlineColor {
192- return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
193- if (states.contains(MaterialState.selected)) {
194- return null;
195- }
196- if (states.contains(MaterialState.disabled)) {
197- return ${componentColor ('md.comp.switch.disabled.unselected.track.outline' )}.withOpacity(${opacity ('md.comp.switch.disabled.track.opacity' )});
198- }
199- return ${componentColor ('md.comp.switch.unselected.track.outline' )};
200- });
201- }
202-
203203 @override
204204 double get trackWidth => ${tokens ['md.comp.switch.track.width' ]};
205205
You can’t perform that action at this time.
0 commit comments