feat: Implement attire photo capture, update AttireItem entity, and streamline the photo upload and state management flow.

This commit is contained in:
Achintha Isuru
2026-02-25 13:56:35 -05:00
parent 0ad70a4a42
commit 9c9cdaca78
19 changed files with 475 additions and 54 deletions

View File

@@ -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,
);
}
}