submit_button 0.0.4
submit_button: ^0.0.4 copied to clipboard

Flutter Android iOS Linux macOS web Windows

A flutter animated button customization for forms and login/registration pages.

submit_button #

A flutter animated button customization for forms and login/registration pages.

Getting Started #

A flutter animated button customization for forms and login/registration pages. Written in Dart. Fully customizable.

Screenshot

Getting Started #

Add this to your package's pubspec.yaml file

dependencies:
  submit_button: ^0.0.4

Usage #

Next, you just have to import the package using:

import 'package:submit_button/submit_button.dart';

Then place the SubmitButton() widget at the widget tree

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

        final String title;

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

    class _MyHomePageState extends State<MyHomePage> {
        bool _loading = false;

        void _submit() {
            setState(() {
            _loading = true;
            });

            Future.delayed(Duration(milliseconds: 5000), () {
            setState(() {
                _loading = false;
            });
            });
        }

        @override
        Widget build(BuildContext context) {
            return Scaffold(
            appBar: AppBar(
                title: Text(widget.title),
            ),
            body: Center(
                child: Column(
                children: [
                SubmitButton(
                    isLoading: _loading,
                    spinnerColor: Colors.green,
                    backgroundColor: Colors.red,
                    button: FlatButton(onPressed: _submit, child: Text("Submit")),
                ),
                ],
            )),
            );
        }
    }

2
likes
90
pub points
43%
popularity

A flutter animated button customization for forms and login/registration pages.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

latyf01@gmail.com

License

MIT (LICENSE)

Dependencies

animator, flutter

More

Packages that depend on submit_button