You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.3 KiB

3 years ago
import 'package:bytedesk_kefu/model/message.dart';
import 'package:equatable/equatable.dart';
import 'package:meta/meta.dart';
@immutable
abstract class MessageEvent extends Equatable {
const MessageEvent();
@override
List<Object> get props => [];
}
class ReceiveMessageEvent extends MessageEvent {
final Message? message;
ReceiveMessageEvent({@required this.message}) : super();
}
class UploadImageEvent extends MessageEvent {
final String? filePath;
UploadImageEvent({@required this.filePath}) : super();
}
class UploadVideoEvent extends MessageEvent {
final String? filePath;
UploadVideoEvent({@required this.filePath}) : super();
}
class SendMessageRestEvent extends MessageEvent {
final String? json;
SendMessageRestEvent({@required this.json}) : super();
}
class LoadHistoryMessageEvent extends MessageEvent {
final String? uid;
final int? page;
final int? size;
LoadHistoryMessageEvent(
{@required this.uid, @required this.page, @required this.size})
: super();
}
class LoadTopicMessageEvent extends MessageEvent {
final String? topic;
final int? page;
final int? size;
LoadTopicMessageEvent(
{@required this.topic, @required this.page, @required this.size})
: super();
}
class LoadChannelMessageEvent extends MessageEvent {
final String? cid;
final int? page;
final int? size;
LoadChannelMessageEvent(
{@required this.cid, @required this.page, @required this.size})
: super();
}
class QueryAnswerEvent extends MessageEvent {
final String? tid;
final String? aid;
3 years ago
final String? mid;
QueryAnswerEvent({@required this.tid, @required this.aid, @required this.mid}) : super();
}
class QueryCategoryEvent extends MessageEvent {
final String? tid;
final String? cid;
3 years ago
3 years ago
QueryCategoryEvent({@required this.tid, @required this.cid})
: super();
3 years ago
}
class MessageAnswerEvent extends MessageEvent {
3 years ago
// final String? type;
3 years ago
final String? wid;
3 years ago
// final String? aid;
3 years ago
final String? content;
MessageAnswerEvent(
3 years ago
{
// @required this.type,
3 years ago
@required this.wid,
3 years ago
// @required this.aid,
3 years ago
@required this.content})
: super();
}
class RateAnswerEvent extends MessageEvent {
final String? aid;
final String? mid;
final bool? rate;
RateAnswerEvent({@required this.aid, @required this.mid, @required this.rate})
: super();
}