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:
@ -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
31
lib/models/user.dart
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user