Dashboard
This commit is contained in:
parent
1a4c069bb8
commit
9299983776
|
|
@ -23,7 +23,6 @@ class DashboardRepositoryFlutter implements BaseRepository {
|
|||
/// error, it attempts to load the Dashboard from a Web Client.
|
||||
@override
|
||||
Future<dynamic> loadItem(AuthState auth) async {
|
||||
print('DashboardRepo: loadDashboard...');
|
||||
|
||||
final data = await webClient.fetchItem(
|
||||
auth.url + '/dashboard', auth.token);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ class NinjaKeys {
|
|||
static final productHome = const Key('__product_home__');
|
||||
|
||||
static final productList = const Key('__product_list__');
|
||||
static final productsLoading = const Key('__productsLoading__');
|
||||
static final productItem = (int id) => Key('ProductItem__${id}');
|
||||
static final productItemCheckbox = (int id) => Key('ProductItem__${id}__Checkbox');
|
||||
static final productItemProductKey = (int id) => Key('ProductItem__${id}__ProductKey');
|
||||
|
|
|
|||
|
|
@ -15,6 +15,14 @@ class DashboardPanels extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppLoading(builder: (context, loading) {
|
||||
return loading
|
||||
? LoadingIndicator()
|
||||
: _buildPanels();
|
||||
});
|
||||
}
|
||||
|
||||
ListView _buildPanels() {
|
||||
return ListView(
|
||||
padding: EdgeInsets.only(left: 12.0, right: 12.0, top: 20.0),
|
||||
children: <Widget>[
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class ProductList extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return AppLoading(builder: (context, loading) {
|
||||
return loading
|
||||
? LoadingIndicator(key: NinjaKeys.productsLoading)
|
||||
? LoadingIndicator()
|
||||
: _buildListView();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue