boringdeveloper / FlutterSwitch

A Custom Switch package created for Flutter.
https://pub.dev/packages/flutter_switch
BSD 3-Clause "New" or "Revised" License
78 stars 66 forks source link

Allow Font Awesome Icons and images to also be displayed with icons as well #36

Closed ArjanAswal closed 2 years ago

ArjanAswal commented 3 years ago

I was unable to add a font awesome icon and an image inside the switch. I think we should allow all widgets to be displayed inside the switch.

gslender commented 2 years ago

I found that you have to have activeToggleColor: Colors.black, inactiveToggleColor: Colors.black, otherwise it tries to render the icons with the same toggle color and they don't appear.

I also found the FontAwesome icons don't render correctly inside the space and spill over into the surrounding area - not sure if that's a bug with FontAwesome or this library, but the default Flutter Icons seem to work fine (after you fix up the toggle color)