lite_switch 1.0.4 copy "lite_switch: ^1.0.4" to clipboard
lite_switch: ^1.0.4 copied to clipboard

outdated

Lite Switch is a customized switch which you can add text and icon for "On" and "Off". You can also set the width and height for the switch in your app.

Lite Switch #

Lite Switch is a customized switch which you can add text and icon for "On" and "Off". You can also set the width and height for the switch in your app.

Screenshot #

Usage #

To use this plugin :

Add the dependency to your pubspec.yaml file.
  dependencies:
    flutter:
      sdk: flutter
      lite_switch:

Example #

import 'package:lite_switch/lite_switch.dart';
Widget build(BuildContext context) {
    return new Scaffold(
      body: new Center(
        child: new Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Padding(
              padding: EdgeInsets.only(top: 0),
              child: LiteSwitch(
                value: true,
                textSize: 16.0,
                iWidth: 140,
                iHeight: 40,
                textOn: 'Sound ON',
                textOff: 'Sound Off',
                colorOn: Colors.deepOrange,
                colorOff: Colors.black,
                iconOn: Icons.volume_up,
                iconOff: Icons.volume_off,
                onChanged: (bool state) {
                  print('turned ${(state) ? 'on' : 'off'}');
                },
              ),
            ),
          ],
        ),
      ),
    );
 }
3
likes
0
points
47
downloads

Publisher

verified publishergalacticpuffin.com

Weekly Downloads

Lite Switch is a customized switch which you can add text and icon for "On" and "Off". You can also set the width and height for the switch in your app.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on lite_switch