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.
61 lines
1.2 KiB
61 lines
1.2 KiB
import 'package:bytedesk_kefu/model/friend.dart';
|
|
import 'package:equatable/equatable.dart';
|
|
|
|
abstract class FriendState extends Equatable {
|
|
const FriendState();
|
|
@override
|
|
List<Object> get props => [];
|
|
}
|
|
|
|
/// UnInitialized
|
|
class UnFriendState extends FriendState {
|
|
UnFriendState();
|
|
|
|
@override
|
|
String toString() => 'UnFriendState';
|
|
}
|
|
|
|
/// Initialized
|
|
class FriendLoading extends FriendState {
|
|
FriendLoading() : super();
|
|
|
|
@override
|
|
String toString() => 'FriendLoading';
|
|
}
|
|
|
|
class FriendUpdateSuccess extends FriendState {
|
|
FriendUpdateSuccess() : super();
|
|
|
|
@override
|
|
String toString() => 'FriendUpdateSuccess';
|
|
}
|
|
|
|
class FriendCreateSuccess extends FriendState {
|
|
final Friend? friend;
|
|
FriendCreateSuccess({this.friend});
|
|
|
|
@override
|
|
String toString() => 'FriendCreateSuccess';
|
|
}
|
|
|
|
class FriendLoadSuccess extends FriendState {
|
|
final List<Friend> friendList;
|
|
|
|
FriendLoadSuccess(this.friendList);
|
|
|
|
@override
|
|
List<Object> get props => [friendList];
|
|
|
|
@override
|
|
String toString() => 'FriendLoadSuccess { FriendList: ${friendList.length} }';
|
|
}
|
|
|
|
class ErrorFriendState extends FriendState {
|
|
final String errorMessage;
|
|
|
|
ErrorFriendState(this.errorMessage);
|
|
|
|
@override
|
|
String toString() => 'ErrorFriendState';
|
|
}
|