mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-30 00:36:28 +00:00
24 lines
623 B
Dart
24 lines
623 B
Dart
import 'package:image_picker/image_picker.dart';
|
|
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;
|
|
final PickedFile image;
|
|
|
|
NewConversationMessage(
|
|
{@required this.conversationID, @required this.message, this.image})
|
|
: assert(conversationID != null),
|
|
assert(image != null || message != null);
|
|
|
|
bool get hasMessage => message != null;
|
|
|
|
bool get hasImage => image != null;
|
|
}
|