diff --git a/lib/ui/dashboard/dashboard_panels.dart b/lib/ui/dashboard/dashboard_panels.dart index a0aec2cc4..34f5fe274 100644 --- a/lib/ui/dashboard/dashboard_panels.dart +++ b/lib/ui/dashboard/dashboard_panels.dart @@ -8,6 +8,7 @@ import 'package:flutter/material.dart'; import 'package:charts_common/common.dart'; import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter_redux/flutter_redux.dart'; +import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:invoiceninja_flutter/redux/app/app_state.dart'; import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart'; @@ -675,12 +676,25 @@ class DashboardPanels extends StatelessWidget { return Column( children: [ - FormCard( - children: [ - Text('test', style: textTheme.headline6), - Text(formatNumber(0, context), - style: textTheme.headline5), - ], + SizedBox(height: 20), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12), + child: StaggeredGrid.count( + crossAxisCount: 2, + crossAxisSpacing: 8, + mainAxisSpacing: 12, + children: settings.totalFields.map((field) { + return FormCard( + padding: const EdgeInsets.all(0), + children: [ + Text(localization.lookup(field), + style: textTheme.headline6), + Text(formatNumber(0, context), + style: textTheme.headline5), + ], + ); + }).toList(), + ), ), _OverviewPanel( viewModel: viewModel, diff --git a/pubspec.foss.yaml b/pubspec.foss.yaml index 30511111a..8bf03fe5d 100644 --- a/pubspec.foss.yaml +++ b/pubspec.foss.yaml @@ -78,6 +78,7 @@ dependencies: bitsdojo_window: ^0.1.2 intl_phone_field: ^3.1.0 pinput: ^2.2.11 + flutter_staggered_grid_view: ^0.6.2 # quick_actions: ^0.2.1 # idb_shim: ^1.11.1+1 diff --git a/pubspec.lock b/pubspec.lock index e1b552209..2f3b3228e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -415,6 +415,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" + flutter_staggered_grid_view: + dependency: "direct main" + description: + name: flutter_staggered_grid_view + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.2" flutter_styled_toast: dependency: "direct main" description: diff --git a/pubspec.next.yaml b/pubspec.next.yaml index c2d9d9b86..43f6bc9d2 100644 --- a/pubspec.next.yaml +++ b/pubspec.next.yaml @@ -78,6 +78,7 @@ dependencies: bitsdojo_window: ^0.1.2 intl_phone_field: ^3.1.0 pinput: ^2.2.11 + flutter_staggered_grid_view: ^0.6.2 # quick_actions: ^0.2.1 # idb_shim: ^1.11.1+1 diff --git a/pubspec.yaml b/pubspec.yaml index 47e1f2572..17306d2a8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -78,6 +78,7 @@ dependencies: bitsdojo_window: ^0.1.2 intl_phone_field: ^3.1.0 pinput: ^2.2.11 + flutter_staggered_grid_view: ^0.6.2 # quick_actions: ^0.2.1 # idb_shim: ^1.11.1+1