switcher_button 0.0.4 copy "switcher_button: ^0.0.4" to clipboard
switcher_button: ^0.0.4 copied to clipboard

Flutter switch button with minimal design and material animation and highly customizable.It can be use as switch button or toggle buttons.

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Container(
        color: Colors.orange,
        child: Center(
          child: SwitcherButton(
            value: true,
            onChange: (value) {
              print(value);
            },
          ),
        ),
      ),
    );
  }
}
85
likes
130
pub points
91%
popularity

Publisher

unverified uploader

Flutter switch button with minimal design and material animation and highly customizable.It can be use as switch button or toggle buttons.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on switcher_button