Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to increase width of Switch in flutter?

I want to create a Switch like below :
enter image description here

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 …)?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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) {},
)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading