2019-04-25 18:14:19 +00:00
|
|
|
import 'dart:io';
|
|
|
|
|
2019-04-25 07:48:52 +00:00
|
|
|
import 'package:meta/meta.dart';
|
|
|
|
|
|
|
|
/// New conversation message model
|
|
|
|
///
|
|
|
|
/// This model is used to transfer a conversation message to send in the application
|
|
|
|
///
|
|
|
|
/// @author Pierre HUBERT
|
|
|
|
|
|
|
|
class NewConversationMessage {
|
|
|
|
final int conversationID;
|
|
|
|
final String message;
|
2019-04-25 18:14:19 +00:00
|
|
|
final File image;
|
2019-04-25 07:48:52 +00:00
|
|
|
|
|
|
|
NewConversationMessage({
|
|
|
|
@required this.conversationID,
|
|
|
|
@required this.message,
|
2019-04-25 18:14:19 +00:00
|
|
|
this.image
|
|
|
|
}) : assert(conversationID != null),
|
|
|
|
assert(image != null || message != null);
|
|
|
|
|
|
|
|
bool get hasMessage => message != null;
|
|
|
|
bool get hasImage => image != null;
|
2019-04-25 07:48:52 +00:00
|
|
|
}
|