Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Nov 18, 2023
1 parent ca94ce6 commit a98af23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
12 changes: 5 additions & 7 deletions lib/view/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down
7 changes: 4 additions & 3 deletions lib/view/widget/stats/base_stat_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
),
Expand Down

0 comments on commit a98af23

Please sign in to comment.