custom_switch_button 0.5.0 copy "custom_switch_button: ^0.5.0" to clipboard
custom_switch_button: ^0.5.0 copied to clipboard

A new Flutter plugin.

custom_switch_button #

Customized switch button to make your flutter development easier and more fun to do.

Get started #

Add dependency #

dependencies:
  custom_switch_button: ^0.5.0

Example #

import 'package:custom_switch_button/custom_switch_button.dart';

bool isChecked = false;

return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Custom Switch Button example app'),
        ),
        body: GestureDetector(
          onTap: () {
            setState(() {
              isChecked = !isChecked;
            });
          },
          child: Center(
            child: CustomSwitchButton(
              backgroundColor: Colors.blueGrey,
              unCheckedColor: Colors.white,
              animationDuration: Duration(milliseconds: 400),
              checkedColor: Colors.lightGreen,
              checked: isChecked,
            ),
          ),
        ),
      ),
    );

11
likes
20
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter plugin.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, simple_animations

More

Packages that depend on custom_switch_button