flutter_progress_button 1.0.0 copy "flutter_progress_button: ^1.0.0" to clipboard
flutter_progress_button: ^1.0.0 copied to clipboard

flutter_progress_button is a free and open source (MIT license) Material Flutter Button that supports variety of buttons style demands. It is designed to be easy to use and customizable.

flutter_progress_button #

GitHub repo size GitHub code size in bytes GitHub top language GitHub issues GitHub license

flutter_progress_button is a free and open source (MIT license) Material Flutter Button that supports variety of buttons style demands. It is designed to be easy to use and customizable.

Get started #

Depend on it #

Add this to your package's pubspec.yaml file:

flutter_progress_button: '^0.6.4'
copied to clipboard

Install it #

You can install packages from the command line:

$ flutter pub get
copied to clipboard

Alternatively, your editor might support flutter pub get.

Import it #

Now in your Dart code, you can use:

import 'package:flutter_progress_button/flutter_progress_button.dart';

copied to clipboard

How to use #

Add ProgressButton to your widget tree:

ProgressButton(
    normalWidget: const Text('I am a button'),
    progressWidget: const CircularProgressIndicator(),
    width: 196,
    height: 40,
    onPressed: () async {
        int score = await Future.delayed(
            const Duration(milliseconds: 3000), () => 42);
        // After [onPressed], it will trigger animation running backwards, from end to beginning
        return () {
        // Optional returns is returning a VoidCallback that will be called
        // after the animation is stopped at the beginning.
        // A best practice would be to do time-consuming task in [onPressed],
        // and do page navigation in the returned VoidCallback.
        // So that user won't missed out the reverse animation.
        };
    },
),
copied to clipboard

More parameters:

ProgressButton({
    Key key,
    this.defaultWidget,
    this.progressWidget,
    this.onPressed,
    this.type = ProgressButtonType.Raised,
    this.color,
    this.width = double.infinity,
    this.height = 40.0,
    this.borderRadius = 2.0,
    this.animate = true,
}) : super(key: key);
copied to clipboard

Three types supported:

enum ProgressButtonType {
    Raised,
    Flat,
    Outline,
}
copied to clipboard

Source #

Source code and example of this library can be found in git:

$ git clone https://github.com/jiangyang5157/flutter_progress_button.git
copied to clipboard
22
likes
30
points
236
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.11 - 2025.03.26

flutter_progress_button is a free and open source (MIT license) Material Flutter Button that supports variety of buttons style demands. It is designed to be easy to use and customizable.

Repository (GitHub)

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_progress_button