Skip to content

A beautiful and personalized switcher component

License

Notifications You must be signed in to change notification settings

Ofceab-Studio/switcher

 
 

Repository files navigation

logo

A animated, beautiful and personalized switcher component.

Based on Eduardo Muñoz's widget lite_rolling_switch

 

Pub Package Buy Me A Coffee

Overview

A animated and beautiful Switcher

Contributing

Getting Started

In pubspec.yaml:

dependencies:
  switcher: any

See how:

Using switcher

Using switcher

Using switcher

Using switcher

Using switcher

Using switcher

Using switcher

Using switcher

import 'package:switcher/switcher.dart';

Switcher(
    value: false,
    size: SwitcherSize.large,
    switcherButtonRadius: 50,
    enabledSwitcherButtonRotate: true,
    iconOff: Icons.lock,
    iconOn: Icons.lock_open,
    colorOff: Colors.blueGrey.withOpacity(0.3),
    colorOn: Colors.blue,
    onChanged: (bool state) {
    //
    },
),

 Switcher(
    value: false,
    size: SwitcherSize.large,
    switcherButtonRadius: 50,
    iconOff: null,

    enabledSwitcherButtonRotate: false,
    colorOff: Colors.blueGrey.withOpacity(0.3),
    colorOn: Colors.blue,
    onChanged: (bool state) {
    //
    },
),


// Switcher with labels
Switcher(
                      value: false,
                      size: SwitcherSize.large,
                      labelOff: Text('is off'), // label to display on off
                      labelOn: Text('is on'),// label to display on off
                      colorOff: Colors.indigo.withOpacity(0.3),
                      colorOn: Colors.indigo,
                      switcherButtonBoxShape: BoxShape.rectangle,
                      enabledSwitcherButtonRotate: false,
                      onChanged: (bool state) {
                        //
                      },
                    ),

Features and bugs

Please send feature requests and bugs at the issue tracker.

About

A beautiful and personalized switcher component

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 39.6%
  • C++ 29.1%
  • CMake 23.7%
  • Swift 2.2%
  • HTML 1.9%
  • C 1.8%
  • Other 1.7%