Last updated:
0 purchases
load in button
load_in_button #
A button with a loading icon inside.
Getting Started #
Just create the button on your code as the same way you would with a FlatButton.
LoadInButton(
key: _buttonKey,
onPressed: _buttonPressed,
child: Text('CONFIRMAR PEDIDO'),
color: Colors.red,
textColor: Colors.white
)
copied to clipboard
Control the loading #
bool variable
LoadInButton contains a isLoading property which controls if the button is loading or not. Just set it's value on the widget build.
LoadInButton(
key: _buttonKey,
isLoading: _isButtonLoading,
onPressed: _buttonPressed,
child: Text('CONFIRMAR PEDIDO'),
color: Colors.red,
textColor: Colors.white
)
copied to clipboard
Acessing the state
It's also possible to use the GlobalKey to retrieve the start and use the helper methods
//Start the loading
_buttonKey.currentState?.start();
//Do something
//Finish the loading
_buttonKey.currentState?.finish();
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.