Added Last Name display and made it editable

This commit is contained in:
Arseni
2025-12-24 18:48:33 +03:00
parent 964e90767d
commit 4453dab366
8 changed files with 118 additions and 43 deletions

View File

@@ -20,6 +20,14 @@ class AccountBase implements StorableDescribable {
DateTime get updatedAt => storable.updatedAt;
@override
String get name => describable.name;
String get fullName {
final first = describable.name.trim();
final last = lastName.trim();
if (last.isEmpty) return first;
if (first.isEmpty) return last;
return '$first $last';
}
@override
String? get description => describable.description;
@@ -32,7 +40,7 @@ class AccountBase implements StorableDescribable {
required this.lastName,
});
String get nameInitials => getNameInitials(describable.name);
String get nameInitials => getNameInitials(fullName);
AccountBase copyWith({
Describable? describable,