diff --git a/green_walking/lib/config.dart b/green_walking/lib/config.dart index 549efb0..5b46d94 100644 --- a/green_walking/lib/config.dart +++ b/green_walking/lib/config.dart @@ -4,6 +4,7 @@ String appAuthor = 'Xennis'; String supportMail = 'code@xennis.org'; Uri privacyPolicyUrl = Uri.https('raw.githubusercontent.com', '/Xennis/green-walking/main/web/privacy/privacy-policy.md'); +Uri appPlayStoreUrl = Uri.https('play.google.com', '/store/apps/details', {'id': androidAppID}); class CustomMapboxStyles { static const String outdoor = 'mapbox://styles/xennis/ckfbioyul1iln1ap0pm5hrcgy'; diff --git a/green_walking/lib/pages/map.dart b/green_walking/lib/pages/map.dart index 577166d..bf220b7 100644 --- a/green_walking/lib/pages/map.dart +++ b/green_walking/lib/pages/map.dart @@ -91,7 +91,7 @@ class _MapConfig { } class _NoTransitionPageRoute extends MaterialPageRoute { - _NoTransitionPageRoute({required WidgetBuilder builder, super.settings}) : super(builder: builder); + _NoTransitionPageRoute({required super.builder, super.settings}); @override Widget buildTransitions( diff --git a/green_walking/lib/widgets/location_button.dart b/green_walking/lib/widgets/location_button.dart index c44b39c..b916dda 100644 --- a/green_walking/lib/widgets/location_button.dart +++ b/green_walking/lib/widgets/location_button.dart @@ -68,7 +68,7 @@ class _LocationButtonState extends State { ); } - Future _checkLocationServiceEnabled() async { + void _checkLocationServiceEnabled() async { final bool enabled = await Geolocator.isLocationServiceEnabled(); if (enabled != _locationServiceEnabled) { setState(() { @@ -77,7 +77,7 @@ class _LocationButtonState extends State { } } - Future _onPressed() async { + void _onPressed() async { bool permissionGranted = false; // Check permission diff --git a/green_walking/lib/widgets/map_view.dart b/green_walking/lib/widgets/map_view.dart index e4a842c..f8b7466 100644 --- a/green_walking/lib/widgets/map_view.dart +++ b/green_walking/lib/widgets/map_view.dart @@ -21,7 +21,7 @@ class MapView extends StatefulWidget { final String accessToken; final CameraOptions? lastCameraOption; - final void Function() onOpenDrawer; + final VoidCallback onOpenDrawer; final Future Function({Position? userPosition, Position? reversePosition, Position? proximity}) onSearchPage; diff --git a/green_walking/lib/widgets/navigation_drawer.dart b/green_walking/lib/widgets/navigation_drawer.dart index 09e9eb4..df63862 100644 --- a/green_walking/lib/widgets/navigation_drawer.dart +++ b/green_walking/lib/widgets/navigation_drawer.dart @@ -94,8 +94,7 @@ class _RateAppListTile extends StatelessWidget { return ListTile( leading: const Icon(Icons.star), title: Text(l10n.rateApp), - onTap: () => launchUrl(Uri.https('play.google.com', '/store/apps/details', {'id': androidAppID}), - mode: LaunchMode.externalApplication)); + onTap: () => launchUrl(appPlayStoreUrl, mode: LaunchMode.externalApplication)); } return Container(); }