Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/halilozercan/ProgressButton
A Flutter Material Button that animates between Progress and Error states
https://github.com/halilozercan/ProgressButton
Last synced: 3 months ago
JSON representation
A Flutter Material Button that animates between Progress and Error states
- Host: GitHub
- URL: https://github.com/halilozercan/ProgressButton
- Owner: halilozercan
- License: other
- Created: 2019-01-29T13:46:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-27T23:43:21.000Z (over 4 years ago)
- Last Synced: 2024-06-16T02:41:33.408Z (5 months ago)
- Language: Dart
- Size: 821 KB
- Stars: 132
- Watchers: 5
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-material-design - ProgressButton - Material Button that morphs into a progress indicator (Flutter / Components)
README
# progress_button
A Material Flutter Button that supports progress and error visuals
## Getting Started
ProgressButton is designed to be easy to use and customizable. Without going into much detail, you can see a demo and example code below. What more do you need from a single class package??
- First, add dependency to your pubspec.yaml
```yaml
dependencies:
progress_button: ^0.0.2
```- Second, add progress button to your widget tree
```dart
val progressButton = ProgressButton(
child: Text("Login"),
onPressed: VoidCallback,
buttonState: ButtonState.normal,
backgroundColor: Theme.of(context).primaryColor,
progressColor: Theme.of(context).primaryColor,
);
```Of course you can change the buttonState anytime you want by using StreamBuilders and such. ProgressButton reacts accordingly to changes.
![Demo 1](/demo1.gif?raw=true)
![Demo 2](/demo2.gif?raw=true)