bouncy_switch 1.0.1 copy "bouncy_switch: ^1.0.1" to clipboard
bouncy_switch: ^1.0.1 copied to clipboard

A lightweight bouncy animated toggle switch for Flutter.

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool enabled = false;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Bouncy Switch')),
        body: Center(
          child: BouncySwitch(
            value: enabled,
            onChanged: (v) => setState(() => enabled = v),
          ),
        ),
      ),
    );
  }
}
1
likes
160
points
152
downloads

Publisher

verified publisherdivyanshdev.tech

Weekly Downloads

A lightweight bouncy animated toggle switch for Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bouncy_switch