Added Last Name display and made it editable
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user