1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-29 16:26:27 +00:00
comunicmobile/lib/models/new_conversation_message.dart

28 lines
646 B
Dart
Raw Normal View History

2021-03-12 16:47:09 +00:00
import 'package:comunic/models/api_request.dart';
2019-04-25 07:48:52 +00:00
/// 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 BytesFile? file;
final BytesFile? thumbnail;
2019-04-25 07:48:52 +00:00
2021-03-12 16:47:09 +00:00
NewConversationMessage({
required this.conversationID,
required this.message,
2021-03-12 16:47:09 +00:00
this.file,
2021-03-12 18:36:42 +00:00
this.thumbnail,
2022-03-11 16:16:46 +00:00
}) : assert(file != null || message != null);
2019-04-25 18:14:19 +00:00
bool get hasMessage => message != null;
2021-02-07 16:09:08 +00:00
2021-03-12 16:47:09 +00:00
bool get hasFile => file != null;
2021-03-12 18:36:42 +00:00
bool get hasThumbnail => thumbnail != null;
2019-04-25 07:48:52 +00:00
}