From a98af2378341ab4a6a733aceab13f242c756ba72 Mon Sep 17 00:00:00 2001 From: Rexios Date: Fri, 17 Nov 2023 19:17:30 -0500 Subject: [PATCH] ... --- lib/view/app.dart | 12 +++++------- lib/view/widget/stats/base_stat_chart.dart | 7 ++++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/view/app.dart b/lib/view/app.dart index 5c53f91..616e517 100644 --- a/lib/view/app.dart +++ b/lib/view/app.dart @@ -14,13 +14,11 @@ class PubStatsApp extends StatelessWidget { themeMode: ThemeMode.dark, darkTheme: AppTheme.theme, // Must use this instead of home for an initial route to work - onGenerateInitialRoutes: (initialRoute) { - return [ - MaterialPageRoute( - builder: (context) => const Home(), - ), - ]; - }, + onGenerateInitialRoutes: (initialRoute) => [ + MaterialPageRoute( + builder: (context) => const Home(), + ), + ], // This must be set but we don't actually need to do anything onGenerateRoute: (settings) => null, ); diff --git a/lib/view/widget/stats/base_stat_chart.dart b/lib/view/widget/stats/base_stat_chart.dart index 24896d9..5ebab70 100644 --- a/lib/view/widget/stats/base_stat_chart.dart +++ b/lib/view/widget/stats/base_stat_chart.dart @@ -71,10 +71,11 @@ class BaseStatChart extends StatelessWidget { const Spacer(), const Text('Not enough data to show chart'), ] else ...[ - const SizedBox(height: 12), - if (spots.length == 1) + if (spots.length == 1) ...[ + const SizedBox(height: 12), StatOverview(spots: filteredSpots.first), - const SizedBox(height: 24), + ], + const SizedBox(height: 32), Expanded( child: builder(_singleY(), _createLineChartBarData()), ),