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);
            },
          ),
        ),
      ),
    );
  }
}
copied to clipboard
96
likes
150
points
3.35k
downloads

Publisher

unverified uploader

Weekly Downloads

2024.08.26 - 2025.03.10

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

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on switcher_button