2019-04-27 14:23:08 +00:00
|
|
|
import 'package:meta/meta.dart';
|
|
|
|
|
|
|
|
/// Conversation settings model
|
|
|
|
///
|
|
|
|
/// Use this model to create / update a conversation
|
|
|
|
///
|
|
|
|
/// @author Pierre HUBERT
|
|
|
|
|
|
|
|
class ConversationSettings {
|
|
|
|
/// Set the ID to 0 if not required
|
|
|
|
final int id;
|
|
|
|
final String name;
|
|
|
|
final bool following;
|
|
|
|
final List<int> members;
|
|
|
|
|
|
|
|
ConversationSettings({
|
|
|
|
@required this.id,
|
|
|
|
@required this.name,
|
|
|
|
@required this.following,
|
|
|
|
@required this.members,
|
|
|
|
}) : assert(members != null && members.length > 0),
|
|
|
|
assert(following != null);
|
|
|
|
|
|
|
|
bool get hasName => name != null && name.length > 0;
|
|
|
|
|
2019-04-27 15:34:24 +00:00
|
|
|
bool get hasId => id != null && id > 0;
|
2019-04-27 14:23:08 +00:00
|
|
|
}
|