瀏覽代碼

Remove unnecessary asserts

ashilkn 2 年之前
父節點
當前提交
8d4bbddc98

+ 0 - 5
lib/ui/viewer/location/dynamic_location_gallery_widget.dart

@@ -52,11 +52,6 @@ class _DynamicLocationGalleryWidgetState
       final stopWatch = Stopwatch()..start();
       final copyOfFiles = List<File>.from(result.files);
       copyOfFiles.removeWhere((f) {
-        assert(
-          f.location != null &&
-              f.location!.latitude != null &&
-              f.location!.longitude != null,
-        );
         return !LocationService.instance.isFileInsideLocationTag(
           InheritedLocationTagData.of(context).centerPoint,
           f.location!,

+ 0 - 5
lib/ui/viewer/location/location_screen.dart

@@ -151,11 +151,6 @@ class _LocationGalleryWidgetState extends State<LocationGalleryWidget> {
       final stopWatch = Stopwatch()..start();
       final copyOfFiles = List<File>.from(result.files);
       copyOfFiles.removeWhere((f) {
-        assert(
-          f.location != null &&
-              f.location!.latitude != null &&
-              f.location!.longitude != null,
-        );
         return !LocationService.instance.isFileInsideLocationTag(
           centerPoint,
           f.location!,