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()), ),