feat: Implement attire photo capture, update AttireItem entity, and streamline the photo upload and state management flow.
This commit is contained in:
@@ -9,6 +9,7 @@ class AttireItem extends Equatable {
|
||||
/// Creates an [AttireItem].
|
||||
const AttireItem({
|
||||
required this.id,
|
||||
required this.code,
|
||||
required this.label,
|
||||
this.description,
|
||||
this.imageUrl,
|
||||
@@ -18,9 +19,12 @@ class AttireItem extends Equatable {
|
||||
this.verificationId,
|
||||
});
|
||||
|
||||
/// Unique identifier of the attire item.
|
||||
/// Unique identifier of the attire item (UUID).
|
||||
final String id;
|
||||
|
||||
/// String code for the attire item (e.g. BLACK_TSHIRT).
|
||||
final String code;
|
||||
|
||||
/// Display name of the item.
|
||||
final String label;
|
||||
|
||||
@@ -45,6 +49,7 @@ class AttireItem extends Equatable {
|
||||
@override
|
||||
List<Object?> get props => <Object?>[
|
||||
id,
|
||||
code,
|
||||
label,
|
||||
description,
|
||||
imageUrl,
|
||||
@@ -53,4 +58,29 @@ class AttireItem extends Equatable {
|
||||
photoUrl,
|
||||
verificationId,
|
||||
];
|
||||
|
||||
/// Creates a copy of this [AttireItem] with the given fields replaced.
|
||||
AttireItem copyWith({
|
||||
String? id,
|
||||
String? code,
|
||||
String? label,
|
||||
String? description,
|
||||
String? imageUrl,
|
||||
bool? isMandatory,
|
||||
AttireVerificationStatus? verificationStatus,
|
||||
String? photoUrl,
|
||||
String? verificationId,
|
||||
}) {
|
||||
return AttireItem(
|
||||
id: id ?? this.id,
|
||||
code: code ?? this.code,
|
||||
label: label ?? this.label,
|
||||
description: description ?? this.description,
|
||||
imageUrl: imageUrl ?? this.imageUrl,
|
||||
isMandatory: isMandatory ?? this.isMandatory,
|
||||
verificationStatus: verificationStatus ?? this.verificationStatus,
|
||||
photoUrl: photoUrl ?? this.photoUrl,
|
||||
verificationId: verificationId ?? this.verificationId,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user