Skip to content

armgit / ente

Public Imported from GitHub
0

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

Adopt Dart 3.13 lint syntax

AmanRajSinghMouryacfa036536813
diff --git a/mobile/apps/locker/lib/services/files/links/links_client.dart b/mobile/apps/locker/lib/services/files/links/links_client.dart
index 201486a95c..9967dca8a3 100644
--- a/mobile/apps/locker/lib/services/files/links/links_client.dart
+++ b/mobile/apps/locker/lib/services/files/links/links_client.dart
@@ -21,11 +21,7 @@ class LinksClient {
try {
final response = await _enteDio.post(
'/files/share-url',
- data: {
- 'fileID': fileID,
- 'app': 'locker',
- if (metadata != null) ...metadata,
- },
+ data: {'fileID': fileID, 'app': 'locker', ...?metadata},
);
return ShareableLink.fromJson(response.data as Map<String, dynamic>);
} on DioException catch (e) {
diff --git a/mobile/apps/photos/lib/models/memories/clip_memory.dart b/mobile/apps/photos/lib/models/memories/clip_memory.dart
index f00b636b93..75de4ded2b 100644
--- a/mobile/apps/photos/lib/models/memories/clip_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/clip_memory.dart
@@ -366,17 +366,10 @@ class ClipMemory extends SmartMemory {
int firstDateToShow,
int lastDateToShow,
this.clipMemoryType, {
- String? id,
+ super.id,
super.firstCreationTime,
super.lastCreationTime,
- }) : super(
- memories,
- MemoryType.clip,
- '',
- firstDateToShow,
- lastDateToShow,
- id: id,
- );
+ }) : super(memories, MemoryType.clip, '', firstDateToShow, lastDateToShow);
@override
String createTitle(StringsLocalizations locals, String languageCode) {
diff --git a/mobile/apps/photos/lib/models/memories/filler_memory.dart b/mobile/apps/photos/lib/models/memories/filler_memory.dart
index 5cac6fb710..f5fd6f2555 100644
--- a/mobile/apps/photos/lib/models/memories/filler_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/filler_memory.dart
@@ -9,7 +9,7 @@ class FillerMemory extends SmartMemory {
this.yearsAgo,
int firstDateToShow,
int lastDateToShow, {
- String? id,
+ super.id,
super.firstCreationTime,
super.lastCreationTime,
}) : super(
@@ -18,7 +18,6 @@ class FillerMemory extends SmartMemory {
'filler',
firstDateToShow,
lastDateToShow,
- id: id,
);
@override
diff --git a/mobile/apps/photos/lib/models/memories/on_this_day_memory.dart b/mobile/apps/photos/lib/models/memories/on_this_day_memory.dart
index 54b3254dc3..aa5a95e7c0 100644
--- a/mobile/apps/photos/lib/models/memories/on_this_day_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/on_this_day_memory.dart
@@ -7,7 +7,7 @@ class OnThisDayMemory extends SmartMemory {
List<Memory> memories,
int firstDateToShow,
int lastDateToShow, {
- String? id,
+ super.id,
super.firstCreationTime,
super.lastCreationTime,
}) : super(
@@ -16,7 +16,6 @@ class OnThisDayMemory extends SmartMemory {
'',
firstDateToShow,
lastDateToShow,
- id: id,
);
@override
diff --git a/mobile/apps/photos/lib/models/memories/people_memory.dart b/mobile/apps/photos/lib/models/memories/people_memory.dart
index a73b85f389..6e21f0882b 100644
--- a/mobile/apps/photos/lib/models/memories/people_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/people_memory.dart
@@ -116,7 +116,7 @@ class PeopleMemory extends SmartMemory {
this.personID,
this.personName, {
String? title,
- String? id,
+ super.id,
super.firstCreationTime,
super.lastCreationTime,
this.activity,
@@ -129,7 +129,6 @@ class PeopleMemory extends SmartMemory {
title ?? '',
firstDateToShow,
lastDateToShow,
- id: id,
);
PeopleMemory copyWith({
diff --git a/mobile/apps/photos/lib/models/memories/time_memory.dart b/mobile/apps/photos/lib/models/memories/time_memory.dart
index bf720252c6..19d650b30d 100644
--- a/mobile/apps/photos/lib/models/memories/time_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/time_memory.dart
@@ -25,7 +25,7 @@ class TimeMemory extends SmartMemory {
List<Memory> memories,
int firstDateToShow,
int lastDateToShow, {
- String? id,
+ super.id,
this.day,
this.month,
this.yearsAgo,
@@ -41,14 +41,7 @@ class TimeMemory extends SmartMemory {
kind != TimeMemoryKind.month || month != null,
"month must be provided for month-based time memories",
),
- super(
- memories,
- MemoryType.time,
- '',
- firstDateToShow,
- lastDateToShow,
- id: id,
- );
+ super(memories, MemoryType.time, '', firstDateToShow, lastDateToShow);
@override
String createTitle(StringsLocalizations locals, String languageCode) {
diff --git a/mobile/apps/photos/lib/models/memories/trip_memory.dart b/mobile/apps/photos/lib/models/memories/trip_memory.dart
index 583d0cb85a..88bb8463a4 100644
--- a/mobile/apps/photos/lib/models/memories/trip_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/trip_memory.dart
@@ -15,20 +15,13 @@ class TripMemory extends SmartMemory {
int firstDateToShow,
int lastDateToShow,
this.location, {
- String? id,
+ super.id,
this.locationName,
this.tripYear,
this.tripKey,
super.firstCreationTime,
super.lastCreationTime,
- }) : super(
- memories,
- MemoryType.trips,
- '',
- firstDateToShow,
- lastDateToShow,
- id: id,
- );
+ }) : super(memories, MemoryType.trips, '', firstDateToShow, lastDateToShow);
TripMemory copyWith({
List<Memory>? memories,
diff --git a/mobile/apps/photos/lib/ui/viewer/file/video_exif_dialog.dart b/mobile/apps/photos/lib/ui/viewer/file/video_exif_dialog.dart
index 8fc525ac8d..d081711af7 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/video_exif_dialog.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/video_exif_dialog.dart
@@ -155,7 +155,7 @@ class VideoExifDialog extends StatelessWidget {
],
),
);
- } catch (e, _) {
+ } catch (e) {
return const SizedBox.shrink();
}
}