1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-26 23:09:21 +00:00
comunicmobile/lib/models/new_comment.dart

24 lines
449 B
Dart
Raw Normal View History

2019-05-18 12:58:35 +00:00
import 'package:meta/meta.dart';
2021-03-13 17:03:20 +00:00
import 'api_request.dart';
2019-05-18 12:58:35 +00:00
/// New comment information
///
/// @author Pierre HUBERT
class NewComment {
final int postID;
final String content;
2021-03-13 17:03:20 +00:00
final BytesFile image;
2019-05-18 12:58:35 +00:00
const NewComment({
@required this.postID,
@required this.content,
@required this.image,
}) : assert(postID != null);
bool get hasContent => content != null && content.length > 0;
bool get hasImage => image != null;
}