Skip to content

Commit

Permalink
location permission cancel dialog fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmohsin7 committed Sep 16, 2024
1 parent 0e73353 commit 6f018ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/lib/pages/memories/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import 'package:friend_private/providers/memory_provider.dart';
import 'package:friend_private/utils/analytics/mixpanel.dart';
import 'package:friend_private/widgets/dialog.dart';
import 'package:geolocator/geolocator.dart';
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
import 'package:location/location.dart';
import 'package:provider/provider.dart';
import 'package:visibility_detector/visibility_detector.dart';

Expand Down Expand Up @@ -41,7 +39,12 @@ class _MemoriesPageState extends State<MemoriesPage> with AutomaticKeepAliveClie
context: context,
builder: (c) => getDialog(
context,
() => Navigator.of(context).pop(),
() {
SharedPreferencesUtil().locationPermissionRequested = true;
SharedPreferencesUtil().locationEnabled = false;
MixpanelManager().setUserProperty('Location Enabled', SharedPreferencesUtil().locationEnabled);
Navigator.of(context).pop();
},
() async {
await LocationService().enableService();
if (await LocationService().isServiceEnabled()) {
Expand Down

0 comments on commit 6f018ad

Please sign in to comment.