Dashboard

This commit is contained in:
unknown 2018-05-22 12:20:30 -07:00
parent 1a4c069bb8
commit 9299983776
4 changed files with 9 additions and 3 deletions

View File

@ -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);

View File

@ -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');

View File

@ -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>[

View File

@ -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();
});
}