mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-19 02:43:50 +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? imageUrl;
|
||||
|
||||
String? get fullName => firstName == null && lastName == null
|
||||
? null
|
||||
: '${firstName ?? ''} ${lastName ?? ''}';
|
||||
String? get fullName {
|
||||
var fullName = '';
|
||||
|
||||
if (firstName != null) {
|
||||
fullName += firstName!;
|
||||
}
|
||||
|
||||
if (lastName != null) {
|
||||
fullName += ' $lastName';
|
||||
}
|
||||
|
||||
return fullName == '' ? null : fullName;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue