circular_loading_button

Creator: coderz1093

Last updated:

0 purchases

circular_loading_button Image
circular_loading_button Images

Languages

Categories

Add to Cart

Description:

circular loading button

loading_button #
loading_button is a flutter loading/progress animated button.

loading_button is implemented using native flutter buttons type (ElevatedButton, FilledButton, OutlinedButton at this moment). For this reason it is customizable throught your app theme
Try at demo on DartPad
Getting Started #
Follow these steps to use this package
Add dependency #
dependencies:
circular_loading_button: ^1.0.0
copied to clipboard
Add import package #
import 'package:circular_loading_button/loading_button.dart';
copied to clipboard
Easy to use #
Simple example of use LoadingButton
Put this code in your project at an screen and learn how it works 😊
// set initial button state
LoadingButtonState _currentState = LoadingButtonState.idle;

LoadingButton(
type: LoadingButtonType.elevated,
state: _currentState,
onPressed: () {
// change button state to loading
setState(() => _currentState = LoadingButtonState.loading);

// wait 3 seconds and set button state to idle
Future.delayed(const Duration(seconds: 3), () => setState(() => _currentState = LoadingButtonState.idle));
},
child: const Text('Tap me!')
)
copied to clipboard
Parameters #
You can define button sizes in loading and idle state simply adding 'expandedSize' and 'loadingSize' parameters.
LoadingButton(
type: LoadingButtonType.elevated,
state: _currentState,
expandedSize: const Size(250.0, 80.0),
loadingSize: const Size(30.0, 30.0),
onPressed: () {
// TODO your actions
},
child: const Text('Tap me!')
)
copied to clipboard
Contributions #
All contributions are welcome!
Contributions are what make the open source community such an amazing place to be learned, inspire, and create. Any contributions you make are greatly appreciated.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.