TF-1613 Implement handleSuccessViewState and handleFailureViewState for all controller

(cherry picked from commit 35e727e795bb3c44cc9c47e02542b5bdc3955fdd)
This commit is contained in:
dab246
2023-04-04 19:55:18 +07:00
committed by Dat Vu
parent bee9ac37aa
commit 133b04b11c
42 changed files with 662 additions and 810 deletions
@@ -8,6 +8,7 @@ abstract class RemoteException with EquatableMixin implements Exception {
static const internalServerError = 'Internal Server Error';
static const noNetworkError = 'No network error';
static const badCredentials = 'Bad credentials';
static const socketException = 'Socket exception';
final String? message;
final int? code;
@@ -36,6 +37,13 @@ class ConnectError extends RemoteException {
List<Object> get props => [];
}
class SocketError extends RemoteException {
const SocketError() : super(message: RemoteException.socketException);
@override
List<Object> get props => [];
}
class InternalServerError extends RemoteException {
const InternalServerError() : super(message: RemoteException.internalServerError);