combine album name

This commit is contained in:
Alex
2024-06-17 08:50:30 -07:00
parent a3e8701f0a
commit 6c343bf2ed
2 changed files with 35 additions and 9 deletions
@@ -3,19 +3,23 @@
import 'package:photo_manager/photo_manager.dart';
class BackupCandidate {
final String albumName;
final String id;
final List<String> albumName;
final AssetEntity asset;
BackupCandidate({
required this.id,
required this.albumName,
required this.asset,
});
BackupCandidate copyWith({
String? albumName,
String? id,
List<String>? albumName,
AssetEntity? asset,
}) {
return BackupCandidate(
id: id ?? this.id,
albumName: albumName ?? this.albumName,
asset: asset ?? this.asset,
);
@@ -28,9 +32,11 @@ class BackupCandidate {
bool operator ==(covariant BackupCandidate other) {
if (identical(this, other)) return true;
return other.albumName == albumName && other.asset == asset;
return other.id == id &&
other.albumName == albumName &&
other.asset == asset;
}
@override
int get hashCode => albumName.hashCode ^ asset.hashCode;
int get hashCode => id.hashCode ^ albumName.hashCode ^ asset.hashCode;
}