reload_widget

Last updated:

0 purchases

reload_widget Image
reload_widget Images
Add to Cart

Description:

reload widget

A Flutter component that supports tapping Reload when fetching data fails.
Usage #
@override
Widget build(BuildContext context) {
return ReloadWidget(
(BuildContext builderContext) {
return Center(
child: Text(
'Data: $_data',
style: const TextStyle(
fontSize: 28,
fontWeight: FontWeight.w700,
color: Colors.green
)
)
);
},
onReload: () async {
// To simulate API calls
final Result result = await Api.call();

if (result.success) {
_data = result.data;
}

return result.success ? ReloadStatus.succeeded : ReloadStatus.timeout;
}
);
}
copied to clipboard

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.