Adaptive Switch (#130425)
Currently, `Switch.factory` delegates to `CupertinoSwitch` when platform is iOS or macOS. This PR is to: * have the factory configure the Material `Switch` for the expected look and feel. * introduce `Adaptation` class to customize themes for the adaptive components.
This commit is contained in:
@@ -126,6 +126,12 @@ class _${blockName}DefaultsM3 extends SwitchThemeData {
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
MaterialStateProperty<MouseCursor> get mouseCursor {
|
||||
return MaterialStateProperty.resolveWith((Set<MaterialState> states)
|
||||
=> MaterialStateMouseCursor.clickable.resolve(states));
|
||||
}
|
||||
|
||||
@override
|
||||
MaterialStatePropertyAll<double> get trackOutlineWidth => const MaterialStatePropertyAll<double>(${getToken('md.comp.switch.track.outline.width')});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user