1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-10-23 15:03:22 +00:00
comunicmobile/lib/models/conversation.dart

34 lines
808 B
Dart

import 'package:meta/meta.dart';
/// Conversation model
///
/// @author Pierre HUBERT
class Conversation {
final int id;
final int ownerID;
final int lastActive;
final String name;
final bool following;
final bool sawLastMessage;
final List<int> members;
const Conversation({
@required this.id,
@required this.ownerID,
@required this.lastActive,
@required this.name,
@required this.following,
@required this.sawLastMessage,
@required this.members,
}) : assert(id != null),
assert(ownerID != null),
assert(lastActive != null),
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;
}