Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a way to disable the switch. #34

Merged
merged 2 commits into from Mar 16, 2021
Merged

Added a way to disable the switch. #34

merged 2 commits into from Mar 16, 2021

Conversation

boringdeveloper
Copy link
Owner

The disabled parameter will accept a value of true or false (default). If disabled, the switch will have a 0.6 opacity.

FlutterSwitch(
   disabled: true,
   value: status1,
   onToggle: (val) {
       setState(() {
           status1 = val;
       });
    },
),

To try out these changes in your own project, depend on this version by putting these lines of code in your pubspec.yaml

flutter_switch:
    git:
      url: https://github.com/boringdeveloper/FlutterSwitch.git
      ref: 0.3.x

@boringdeveloper boringdeveloper added the enhancement New feature or request label Mar 15, 2021
@boringdeveloper boringdeveloper self-assigned this Mar 15, 2021
@boringdeveloper boringdeveloper linked an issue Mar 15, 2021 that may be closed by this pull request
@prooshani
Copy link

Hi,
I am shocked how fast you did updated the package to add the new feature requested. That was amazing!
Already checked the new package codes and can confirm its functionality.
Well Done and thank you for your quick support.

@boringdeveloper boringdeveloper merged commit 926e7bb into master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Widget Disable Parameter
3 participants