1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-26 06:49:22 +00:00
comunicmobile/lib/models/conversation.dart

34 lines
808 B
Dart
Raw Normal View History

2019-04-23 12:35:41 +00:00
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;
2019-04-23 12:35:41 +00:00
}