Skip to content

Commit

Permalink
Smaller code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Xennis committed Oct 5, 2023
1 parent 697aca4 commit 2247c1f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions green_walking/lib/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ String appAuthor = 'Xennis';
String supportMail = '[email protected]';
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';
Expand Down
2 changes: 1 addition & 1 deletion green_walking/lib/pages/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class _MapConfig {
}

class _NoTransitionPageRoute<T> extends MaterialPageRoute<T> {
_NoTransitionPageRoute({required WidgetBuilder builder, super.settings}) : super(builder: builder);
_NoTransitionPageRoute({required super.builder, super.settings});

@override
Widget buildTransitions(
Expand Down
4 changes: 2 additions & 2 deletions green_walking/lib/widgets/location_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class _LocationButtonState extends State<LocationButton> {
);
}

Future<void> _checkLocationServiceEnabled() async {
void _checkLocationServiceEnabled() async {
final bool enabled = await Geolocator.isLocationServiceEnabled();
if (enabled != _locationServiceEnabled) {
setState(() {
Expand All @@ -77,7 +77,7 @@ class _LocationButtonState extends State<LocationButton> {
}
}

Future<void> _onPressed() async {
void _onPressed() async {
bool permissionGranted = false;

// Check permission
Expand Down
2 changes: 1 addition & 1 deletion green_walking/lib/widgets/map_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MapView extends StatefulWidget {

final String accessToken;
final CameraOptions? lastCameraOption;
final void Function() onOpenDrawer;
final VoidCallback onOpenDrawer;
final Future<Position?> Function({Position? userPosition, Position? reversePosition, Position? proximity})
onSearchPage;

Expand Down
3 changes: 1 addition & 2 deletions green_walking/lib/widgets/navigation_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 2247c1f

Please sign in to comment.