1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Get and show the name of conversation members

This commit is contained in:
2019-04-23 17:29:58 +02:00
parent c94a294252
commit 7fc03ba15c
9 changed files with 199 additions and 13 deletions

View File

@ -27,4 +27,7 @@ class Conversation {
assert(following != null),
assert(sawLastMessage != null),
assert(members != null);
/// Check out whether a conversation has a fixed name or not
bool get has_name => this.name != null;
}

31
lib/models/user.dart Normal file
View File

@ -0,0 +1,31 @@
import 'package:comunic/enums/user_page_visibility.dart';
import 'package:meta/meta.dart';
/// Single user information
///
/// @author Pierre HUBERT
class User {
final int id;
final String firstName;
final String lastName;
final UserPageVisibility pageVisibility;
final String virtualDirectory;
final String accountImageURL;
const User({
@required this.id,
@required this.firstName,
@required this.lastName,
@required this.pageVisibility,
@required this.virtualDirectory,
@required this.accountImageURL,
}) : assert(id != null),
assert(firstName != null),
assert(lastName != null),
assert(pageVisibility != null),
assert(accountImageURL != null);
/// Get user full name
String get fullName => firstName + " " + lastName;
}