dark_floating_switcher widget for Flutter project.
For use dark_floating_switcher widget in your project:
- Add dependency in the pubspec.yaml file
dependencies:
flutter:
sdk: flutter
dark_floating_switcher:
git:
url: git@github.com:Windmill-Smart-Solutions/FLUTTER-dark_floating_switcher.git
- Import widget in the dart file:
import 'package:dark_floating_switcher/dark_floating_switcher.dart';
import 'package:dark_floating_switcher/dark_floating_switcher_state.dart';
-
Make an instance of the widget.
DarkFloatingSwitcher( state: DarkFloatingSwitcherState.on, valueChanged: (state) { if (state == DarkFloatingSwitcherState.on) { print('State is ON'); } else { print('State is OFF'); } }, )
Windmill Smart Solutions 2020 ©