PramodJoshi / toggle_switch

A simple toggle switch widget for Flutter.
https://pub.dev/packages/toggle_switch
MIT License
113 stars 64 forks source link

Allow intialValueIndex to be null #67

Closed vasilich6107 closed 2 years ago

vasilich6107 commented 2 years ago

Hi @PramodJoshi Thanks for your package

Is your feature request related to a problem? Please describe. There is no way to make switch unselected when displaying empty form

Describe the solution you'd like Allow to set intialValueIndex to null

Describe alternatives you've considered No alternatives for now.

Additional context no

PramodJoshi commented 2 years ago

Hi @vasilich6107 , this is already available. Please check the README example titled With custom text styles, null initial label, double tap to de-activate . Also, please make sure you're using the latest version toggle_switch: ^2.0.1.

vasilich6107 commented 2 years ago

@PramodJoshi thanks. It works. I made small PR with improvements.