absorb_on_loading 0.2.0 absorb_on_loading: ^0.2.0 copied to clipboard
A new Flutter package.
absorb_on_loading #
A Package used to ignore the pointer while a button is engaged and also shows a loading indicator on the button while it is engaged.
How to use #
final absorbController = AbsorbController();
AbsorbOnLoading(
controller: absorbController,
builder: (BuildContext context, AbsorbController absorbController,
Widget child) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextField(),
SizedBox(height: 16),
TextField(),
SizedBox(height: 16),
LoadingButton(
absorbController,
onPressed: () async {
await Future.delayed(Duration(seconds: 5));
},
child: Text('Update'),
)
],
);
},
)