fl_switch 0.1.1 copy "fl_switch: ^0.1.1" to clipboard
fl_switch: ^0.1.1 copied to clipboard

A library to draw fantastic Switches with nice animations in Flutter

example/lib/main.dart

import 'package:flutter/material.dart';

import 'curve_switches.dart';
import 'stretchy_switches.dart';
import 'top_clipper.dart';

void main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final width = MediaQuery.of(context).size.width;

    return Scaffold(
      body: Column(
        children: [
          ClipPath(
            clipper: TopClipper(),
            child: Container(
              height: 200,
              width: width,
              color: Color(0xff262e59),
              child: Center(
                child: Text(
                  'FLSwitch -> Stretchy',
                  style: TextStyle(color: Colors.white),
                ),
              ),
            ),
          ),
          SizedBox(height: 30),
          Expanded(
            child: PageView(
              children: [
                StretchySwitches(),
                CurveSwitches(),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
4
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A library to draw fantastic Switches with nice animations in Flutter

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on fl_switch