Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase thumb size of a Switch in Flutter

I want the following thumb size to match as per the given image.

inactive switch sample active switch sample

But the switch looks like this in active and inactive mode.

this how my code makes it look

Here's the code:

Switch(
        value: value,
        onChanged: (){},
        trackOutlineWidth: 0,
        trackOutlineColor: value
            ? blue
            : grey,
        activeTrackColor: blue,
        inactiveThumbColor: white,
        inactiveTrackColor: grey,
      ),

What should I add/modify to make it match the design?

like image 468
Ana Avatar asked Dec 11 '25 00:12

Ana


1 Answers

Not sure if there is a better way because this feels a bit like a work around but giving it this thumbIcon seems to work:

thumbIcon: WidgetStateProperty.all(const Icon(null)),
like image 125
Ivo Beckers Avatar answered Dec 13 '25 12:12

Ivo Beckers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!