Last updated:
0 purchases
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
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.