Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

use const + wrap unawited future with unawaited

ashilkn635f7e724fd9
diff --git a/lib/ui/map/map_screen.dart b/lib/ui/map/map_screen.dart
index 1a5c54c9bf..df692a2fea 100644
--- a/lib/ui/map/map_screen.dart
+++ b/lib/ui/map/map_screen.dart
@@ -45,7 +45,7 @@ class _MapScreenState extends State<MapScreen> {
double maxZoom = 18.0;
double minZoom = 2.8;
int debounceDuration = 500;
- LatLng center = LatLng(46.7286, 4.8614);
+ LatLng center = const LatLng(46.7286, 4.8614);
final Logger _logger = Logger("_MapScreenState");
StreamSubscription? _mapMoveSubscription;
Isolate? isolate;
diff --git a/lib/ui/map/map_view.dart b/lib/ui/map/map_view.dart
index 471ca70983..f316a7719c 100644
--- a/lib/ui/map/map_view.dart
+++ b/lib/ui/map/map_view.dart
@@ -77,8 +77,8 @@ class _MapViewState extends State<MapView> {
enableMultiFingerGestureRace: true,
zoom: widget.initialZoom,
maxBounds: LatLngBounds(
- LatLng(-90, -180),
- LatLng(90, 180),
+ const LatLng(-90, -180),
+ const LatLng(90, 180),
),
onPositionChanged: (position, hasGesture) {
if (position.bounds != null) {
diff --git a/lib/ui/viewer/search/result/go_to_map_widget.dart b/lib/ui/viewer/search/result/go_to_map_widget.dart
index e9921d363d..d3e91009bb 100644
--- a/lib/ui/viewer/search/result/go_to_map_widget.dart
+++ b/lib/ui/viewer/search/result/go_to_map_widget.dart
@@ -1,3 +1,5 @@
+import "dart:async";
+
import "package:flutter/material.dart";
import "package:photos/generated/l10n.dart";
import "package:photos/services/search_service.dart";
@@ -22,10 +24,12 @@ class GoToMapWidget extends StatelessWidget {
onTap: () async {
final bool result = await requestForMapEnable(context);
if (result) {
- Navigator.of(context).push(
- MaterialPageRoute(
- builder: (context) => MapScreen(
- filesFutureFn: SearchService.instance.getAllFiles,
+ unawaited(
+ Navigator.of(context).push(
+ MaterialPageRoute(
+ builder: (context) => MapScreen(
+ filesFutureFn: SearchService.instance.getAllFiles,
+ ),
),
),
);