Skip to content

Windmill-Smart-Solutions/FLUTTER-on_off_switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

on_off_switcher

on_off_switcher widget for Flutter project.

Getting Started

For use on_off_switcher widget in your project:

  1. Add dependency in the pubspec.yaml file
    dependencies:
        flutter:
            sdk: flutter
        on_off_switcher:
            git:
                url: git@github.com:Windmill-Smart-Solutions/FLUTTER-on_off_switcher.git
  1. Import widget in the dart file:
    import 'package:on_off_switcher/on_off_switcher.dart';
    import 'package:on_off_switcher/on_off_switcher_state.dart';
  1. Make an instance of the widget.

         OnOffSwitcher(
                state: OnOffSwitcherState.switchOn,
                valueChanged: (state) {
                  if (state == OnOffSwitcherState.switchOn) {
                    print('State is ON');
                  } else {
                    print('State is OFF');
                  }
                },
              )

    License

    Windmill Smart Solutions 2020 ©

About

on_off_switcher widget for Flutter project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages