Search packages, repositories and app categories

Package detailsv1.0.0

flutter_progress_button

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.

30-day downloads
185
Likes
22
Pub points
30

Install package

flutter pub add flutter_progress_button

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

flutter_progress_button is a customizable, open-source Material Design button for Flutter that supports various styles and progress states. Built with simplicity and flexibility in mind, it enables developers to easily integrate loading indicators, success states, and custom animations into buttons. The package is MIT-licensed and designed for seamless integration into any Flutter project. It enhances user experience by providing visual feedback during actions like form submissions or data fetching.

Use cases

  • Form submission with loading state
  • User authentication flows
  • Data saving operations
  • Interactive UI elements with feedback
  • Customizable button transitions

Key features

  • Supports loading and success states
  • Highly customizable appearance
  • Easy integration with Flutter
  • Material Design compliant
  • Animated transitions between states

Suitable for

  • Developers building interactive forms
  • Teams needing consistent button styling
  • Projects requiring visual feedback on actions
  • UI-heavy applications
  • Open-source contributors looking for lightweight components

Considerations

  • Limited platform-specific customization
  • No built-in support for non-Material themes
  • Requires manual handling of async logic
  • Not optimized for complex state machines
  • Depends on Flutter's Material package

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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: '^1.0.0'
Install it

You can install packages from the command line:

$ flutter pub get

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';

How to use

Add ProgressButton to your widget tree:

ProgressButton(
    defaultWidget: 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.
        };
    },
),

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);

Three types supported:

enum ProgressButtonType {
    Raised,
    Flat,
    Outline,
}

Source

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

$ git clone https://github.com/jiangyang5157/flutter_progress_button.git

Categories

Source repository

Projects using this package

No data available yet.