This commit is contained in:
Phuoc Nguyen
2025-11-25 18:00:01 +07:00
parent 84669ac89c
commit 5e9b0cb562
9 changed files with 337 additions and 167 deletions

View File

@@ -22,6 +22,7 @@ class Address extends Equatable {
final bool isDefault;
final String? cityName;
final String? wardName;
final bool isAllowEdit;
const Address({
required this.name,
@@ -36,6 +37,7 @@ class Address extends Equatable {
this.isDefault = false,
this.cityName,
this.wardName,
this.isAllowEdit = true,
});
@override
@@ -52,6 +54,7 @@ class Address extends Equatable {
isDefault,
cityName,
wardName,
isAllowEdit,
];
/// Get full address display string
@@ -81,6 +84,7 @@ class Address extends Equatable {
bool? isDefault,
String? cityName,
String? wardName,
bool? isAllowEdit,
}) {
return Address(
name: name ?? this.name,
@@ -95,11 +99,12 @@ class Address extends Equatable {
isDefault: isDefault ?? this.isDefault,
cityName: cityName ?? this.cityName,
wardName: wardName ?? this.wardName,
isAllowEdit: isAllowEdit ?? this.isAllowEdit,
);
}
@override
String toString() {
return 'Address(name: $name, addressTitle: $addressTitle, addressLine1: $addressLine1, phone: $phone, isDefault: $isDefault)';
return 'Address(name: $name, addressTitle: $addressTitle, addressLine1: $addressLine1, phone: $phone, isDefault: $isDefault, isAllowEdit: $isAllowEdit)';
}
}