Skip to content

Commit

Permalink
Change the drawer header logic to always open the landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
imaNNeo committed Nov 24, 2023
1 parent 4a9bd3f commit 40caf90
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions example/lib/presentation/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:fl_chart_app/presentation/resources/app_resources.dart';
import 'package:fl_chart_app/urls.dart';
import 'package:fl_chart_app/util/app_helper.dart';
import 'package:fl_chart_app/util/app_utils.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

Expand Down Expand Up @@ -53,18 +52,7 @@ class HomePage extends StatelessWidget {
Navigator.of(context).pop();
}
},
onBannerClicked: kIsWeb || needsDrawer
? () async {
if (kIsWeb) {
await AppUtils().tryToLaunchUrl(Urls.flChartUrl);
return;
}
if (needsDrawer) {
Navigator.of(context).pop();
return;
}
}
: null,
onBannerClicked: () => AppUtils().tryToLaunchUrl(Urls.flChartUrl),
);
final samplesSectionWidget =
ChartSamplesPage(chartType: showingChartType);
Expand Down

0 comments on commit 40caf90

Please sign in to comment.