I want to create a Switch like below :
I tried using Transform.scale
as parent Widget but it doesn't match with that i want.
How should I increase Switch width? or any other suggestion for create similar(like Toggle or ...)?
CodePudding user response:
As far as I know, you only can increase size of Switch with Tranform.scale
, can't increase only width like you want. If you really need that Switch, try use this package flutter_switch like this :
FlutterSwitch(
width: 300,
height: 30.0,
value: true,
onToggle: (val) {},
)
CodePudding user response:
Using SizedBox and FittedBox should do the trick
Same problem discussed here