sliding_switch 0.0.1 copy "sliding_switch: ^0.0.1" to clipboard
sliding_switch: ^0.0.1 copied to clipboard

outdated

Sliding Switch - A simple switch widget. It can be fully customized with desired width, colors, text etc. It also maintains selection state.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:sliding_switch/sliding_switch.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Welcome to Flutter',
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        backgroundColor: Colors.white,
        body: Center(
          child: SlidingSwitch(
            value: false,
            width: 250,
            onChanged: (bool value) {
              print(value);
            },
            height : 55,
            animationDuration : const Duration(milliseconds: 400),
            onTap:(){},
            onDoubleTap:(){},
            onSwipe:(){},
            textOff : "Female",
            textOn : "Male",
            colorOn : const Color(0xffdc6c73),
            colorOff : const Color(0xff6682c0),
            background : const Color(0xffe4e5eb),
            buttonColor : const Color(0xfff7f5f7),
            inactiveColor : const Color(0xff636f7b),
          ),
        ),
      ),
    );
  }
}
33
likes
0
points
372
downloads

Publisher

verified publishercodeapprun.io

Weekly Downloads

Sliding Switch - A simple switch widget. It can be fully customized with desired width, colors, text etc. It also maintains selection state.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on sliding_switch