mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-19 10:53:51 +02:00
fix spaces
This commit is contained in:
parent
b7bb8c394a
commit
5b8c6db64f
1 changed files with 13 additions and 3 deletions
|
@ -15,7 +15,17 @@ class ChatUserModel {
|
||||||
final String? lastName;
|
final String? lastName;
|
||||||
final String? imageUrl;
|
final String? imageUrl;
|
||||||
|
|
||||||
String? get fullName => firstName == null && lastName == null
|
String? get fullName {
|
||||||
? null
|
var fullName = '';
|
||||||
: '${firstName ?? ''} ${lastName ?? ''}';
|
|
||||||
|
if (firstName != null) {
|
||||||
|
fullName += firstName!;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastName != null) {
|
||||||
|
fullName += ' $lastName';
|
||||||
|
}
|
||||||
|
|
||||||
|
return fullName == '' ? null : fullName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue