skip to Main Content

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

2

Answers


  1. 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) {},
    )
    
    Login or Signup to reply.
  2. Using SizedBox and FittedBox should do the trick

    Same problem discussed here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search