Skip to content

Commit

Permalink
fix: Improve LocationsOverviewScreen.dart for iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Sep 25, 2023
1 parent c1bd92c commit 006d635
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
14 changes: 7 additions & 7 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ PODS:
- Alamofire (5.6.2)
- apple_maps_flutter (0.0.1):
- Flutter
- audioplayers_darwin (0.0.1):
- Flutter
- background_fetch (1.1.6):
- Flutter
- background_locator_2 (0.0.1):
- Flutter
- battery_plus (1.0.0):
- Flutter
- clipboard_watcher (0.0.1):
Expand Down Expand Up @@ -96,8 +96,8 @@ PODS:

DEPENDENCIES:
- apple_maps_flutter (from `.symlinks/plugins/apple_maps_flutter/ios`)
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`)
- background_fetch (from `.symlinks/plugins/background_fetch/ios`)
- background_locator_2 (from `.symlinks/plugins/background_locator_2/ios`)
- battery_plus (from `.symlinks/plugins/battery_plus/ios`)
- clipboard_watcher (from `.symlinks/plugins/clipboard_watcher/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
Expand Down Expand Up @@ -135,10 +135,10 @@ SPEC REPOS:
EXTERNAL SOURCES:
apple_maps_flutter:
:path: ".symlinks/plugins/apple_maps_flutter/ios"
audioplayers_darwin:
:path: ".symlinks/plugins/audioplayers_darwin/ios"
background_fetch:
:path: ".symlinks/plugins/background_fetch/ios"
background_locator_2:
:path: ".symlinks/plugins/background_locator_2/ios"
battery_plus:
:path: ".symlinks/plugins/battery_plus/ios"
clipboard_watcher:
Expand Down Expand Up @@ -187,8 +187,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Alamofire: d368e1ff8a298e6dde360e35a3e68e6c610e7204
apple_maps_flutter: c59725efea39e13e703cde52a1d2b14866ad68a8
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
background_fetch: bc9b44b0bf8b434e282a2ac9be8662800a0296ed
background_locator_2: bc8a422343ab656d5bd98e08694c6f89fef20418
battery_plus: 9bff772a7e5e4d5381ca3ca92a97373a3d8b2738
clipboard_watcher: 86fb70421aca6f4944e0591a8292605da7784666
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
Expand Down Expand Up @@ -221,4 +221,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 819f6e738594296500811eae0a41f3dceed5a207

COCOAPODS: 1.11.3
COCOAPODS: 1.12.1
2 changes: 1 addition & 1 deletion lib/screens/LocationsOverviewScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ class _LocationsOverviewScreenState extends State<LocationsOverviewScreen>
width: null,
borderRadius: BorderRadius.circular(HUGE_SPACE),
padding: EdgeInsets.zero,
child: IconButton(
child: PlatformIconButton(
color: shades[400],
icon: Icon(disableShowDetailedLocations
? MdiIcons.mapMarkerMultipleOutline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ class _ViewAlarmSelectRadiusBasedScreenState
center: alarmCenter,
radius: radius,
flutterMapController: flutterMapController,
appleMapController: appleMapController,
onLocationChange: (location) {
// Proximity does not need a center
if (widget.type == LocationAlarmType.proximity) {
Expand Down
11 changes: 8 additions & 3 deletions lib/widgets/RequestBatteryOptimizationsDisabledMixin.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import 'dart:io';

import 'package:disable_battery_optimization/disable_battery_optimization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:locus/services/settings_service/index.dart';
import 'package:locus/utils/repeatedly-check.dart';
import 'package:locus/utils/theme.dart';
import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

import 'package:locus/services/settings_service/index.dart';

mixin RequestBatteryOptimizationsDisabledMixin {
BuildContext get context;

bool get mounted;

Future<bool> showDisableBatteryOptimizationsDialog() async {
if (!Platform.isAndroid) {
return true;
}

final settings = context.read<SettingsService>();

final status =
Expand Down

0 comments on commit 006d635

Please sign in to comment.