mirror of
https://github.com/immich-app/immich.git
synced 2024-12-24 10:37:28 +02:00
4309104925
* New features - Share album. Users can now create albums to share with existing people on the network. - Owner can delete the album. - Owner can invite the additional users to the album. - Shared users and the owner can add additional assets to the album. * In the asset viewer, the user can swipe up to see detailed information and swip down to dismiss. * Several UI enhancements.
61 lines
1.3 KiB
Dart
61 lines
1.3 KiB
Dart
import 'dart:convert';
|
|
|
|
class UserInfo {
|
|
final String id;
|
|
final String email;
|
|
final String createdAt;
|
|
|
|
UserInfo({
|
|
required this.id,
|
|
required this.email,
|
|
required this.createdAt,
|
|
});
|
|
|
|
UserInfo copyWith({
|
|
String? id,
|
|
String? email,
|
|
String? createdAt,
|
|
}) {
|
|
return UserInfo(
|
|
id: id ?? this.id,
|
|
email: email ?? this.email,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toMap() {
|
|
final result = <String, dynamic>{};
|
|
|
|
result.addAll({'id': id});
|
|
result.addAll({'email': email});
|
|
result.addAll({'createdAt': createdAt});
|
|
|
|
return result;
|
|
}
|
|
|
|
factory UserInfo.fromMap(Map<String, dynamic> map) {
|
|
return UserInfo(
|
|
id: map['id'] ?? '',
|
|
email: map['email'] ?? '',
|
|
createdAt: map['createdAt'] ?? '',
|
|
);
|
|
}
|
|
|
|
String toJson() => json.encode(toMap());
|
|
|
|
factory UserInfo.fromJson(String source) => UserInfo.fromMap(json.decode(source));
|
|
|
|
@override
|
|
String toString() => 'UserInfo(id: $id, email: $email, createdAt: $createdAt)';
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
if (identical(this, other)) return true;
|
|
|
|
return other is UserInfo && other.id == id && other.email == email && other.createdAt == createdAt;
|
|
}
|
|
|
|
@override
|
|
int get hashCode => id.hashCode ^ email.hashCode ^ createdAt.hashCode;
|
|
}
|