Source Code added
This commit is contained in:
parent
800376eafd
commit
9efa9bc6dd
3912 changed files with 754770 additions and 2 deletions
29
mobile/lib/models/memories/memory.model.dart
Normal file
29
mobile/lib/models/memories/memory.model.dart
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// ignore_for_file: public_member_api_docs, sort_constructors_first
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
|
||||
class Memory {
|
||||
final String title;
|
||||
final List<Asset> assets;
|
||||
const Memory({required this.title, required this.assets});
|
||||
|
||||
Memory copyWith({String? title, List<Asset>? assets}) {
|
||||
return Memory(title: title ?? this.title, assets: assets ?? this.assets);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'Memory(title: $title, assets: $assets)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
final listEquals = const DeepCollectionEquality().equals;
|
||||
|
||||
return other is Memory && other.title == title && listEquals(other.assets, assets);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => title.hashCode ^ assets.hashCode;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue