Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
chore: Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Sep 24, 2023
1 parent 9e433ab commit c1bd92c
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 235 deletions.
Binary file removed assets/bunny.mp3
Binary file not shown.
2 changes: 0 additions & 2 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,6 @@
"logs_title": "Locus automatically creates logs",
"logs_description": "Logs are kept for 7 days and are automatically deleted afterwards.",
"locationPointsScreen_title": "Location Points",
"bunny_unavailable": "Sorry, but it seems as if your friend is as lost as this song.",
"bunny_unavailable_action": "What's this song?",
"locationAlarm_radiusBasedRegion_notificationTitle_whenEnter": "{name} entered zone {zone}",
"@locationAlarm_radiusBasedRegion_notificationTitle_whenEnter": {
"description": "Notification title when entering a zone; Try to keep this short, will be truncated to 80 characters",
Expand Down
2 changes: 2 additions & 0 deletions lib/screens/LocationsOverviewScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ class _LocationsOverviewScreenState extends State<LocationsOverviewScreen>
latitude: rawPosition.latitude,
longitude: rawPosition.longitude,
accuracy: rawPosition.accuracy,
altitudeAccuracy: 0.0,
headingAccuracy: 0.0,
timestamp: DateTime.now(),
altitude: 0,
heading: 0,
Expand Down
32 changes: 17 additions & 15 deletions lib/services/location_point_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class LocationPointService {
double? batteryLevel,
this.isCopy = false,
this.batteryState,
})
: altitude = altitude == 0.0 ? null : altitude,
}) : altitude = altitude == 0.0 ? null : altitude,
speed = speed == 0.0 ? null : speed,
speedAccuracy = speedAccuracy == 0.0 ? null : speedAccuracy,
heading = heading == 0.0 ? null : heading,
Expand All @@ -65,7 +64,7 @@ class LocationPointService {
"${latitude.toStringAsFixed(5)}, ${longitude.toStringAsFixed(5)}";

factory LocationPointService.dummyFromLatLng(final LatLng latLng,
{final double accuracy = 10.0}) =>
{final double accuracy = 10.0}) =>
LocationPointService(
id: uuid.v4(),
createdAt: DateTime.now(),
Expand All @@ -75,9 +74,9 @@ class LocationPointService {
);

static Future<LocationPointService> fromLocationDto(
final LocationDto locationDto, [
final bool addBatteryInfo = true,
]) async {
final LocationDto locationDto, [
final bool addBatteryInfo = true,
]) async {
BatteryInfo? batteryInfo;

if (addBatteryInfo) {
Expand Down Expand Up @@ -125,8 +124,8 @@ class LocationPointService {
batteryState: json["batteryState"] == null
? null
: BatteryState.values.firstWhere(
(value) => value.name == json["batteryState"],
),
(value) => value.name == json["batteryState"],
),
);
}

Expand All @@ -148,7 +147,8 @@ class LocationPointService {
}

static Future<LocationPointService> fromPosition(
final Position position,) async {
final Position position,
) async {
BatteryInfo? batteryInfo;

try {
Expand Down Expand Up @@ -178,8 +178,7 @@ class LocationPointService {

/// Copies `current` with a new id - mainly used in conjunction with `createUsingCurrentLocation`
/// in background fetch to avoid fetching the location multiple times.
LocationPointService copyWithDifferentId() =>
LocationPointService(
LocationPointService copyWithDifferentId() => LocationPointService(
id: uuid.v4(),
createdAt: DateTime.now(),
latitude: latitude,
Expand All @@ -193,8 +192,10 @@ class LocationPointService {
batteryState: batteryState,
);

static Future<LocationPointService> fromEncrypted(final String cipherText,
final SecretKey encryptionPassword,) async {
static Future<LocationPointService> fromEncrypted(
final String cipherText,
final SecretKey encryptionPassword,
) async {
final message = await decryptUsingAES(
cipherText,
encryptionPassword,
Expand All @@ -203,11 +204,12 @@ class LocationPointService {
return LocationPointService.fromJSON(jsonDecode(message));
}

Position asPosition() =>
Position(
Position asPosition() => Position(
latitude: latitude,
longitude: longitude,
altitude: altitude ?? 0.0,
headingAccuracy: headingAccuracy ?? 0.0,
altitudeAccuracy: 0.0,
accuracy: accuracy,
speed: speed ?? 0.0,
speedAccuracy: speedAccuracy ?? 0.0,
Expand Down
113 changes: 0 additions & 113 deletions lib/widgets/EmptyLocationsThresholdScreen.dart

This file was deleted.

Loading

0 comments on commit c1bd92c

Please sign in to comment.