load_status_view

Last updated:

0 purchases

load_status_view Image
load_status_view Images
Add to Cart

Description:

load status view

LoadStatusView #
Features #
A simple view for different status: loading, success, empty, error, unauthorized.
Getting started #
Add the dependency in pubspec.yaml:
dependencies:
...
load_status_view: ^0.0.1
copied to clipboard
Basic Usage #
///
LoadStatus loadStatus = LoadStatus.loading;
///
LoadStatusView(status: loadStatus,
errorCall: _retry,
child: const Center(
child: Text('content'),
),
)
/// init load data
_loadData() {
_setStatus(LoadStatus.loading);
Future.delayed(Duration(seconds: 2), () {
_setStatus(LoadStatus.success);
});
}
///
_retry() {
_loadData();
}
///
_setStatus(LoadStatus status) {
setState(() {
loadStatus = status;
});
}

copied to clipboard
More Usage #
see example

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.