TF-1361 Fix open notification while no network connection

This commit is contained in:
dab246
2023-01-04 09:43:39 +07:00
committed by Dat H. Pham
parent f2636b1ecf
commit e8a8676d37
4 changed files with 65 additions and 10 deletions
@@ -5,6 +5,7 @@ import 'package:jmap_dart_client/jmap/core/error/method/error_method_response.da
abstract class RemoteException with EquatableMixin implements Exception {
static const connectError = 'Connect error';
static const noNetworkError = 'No network error';
final String? message;
final int? code;
@@ -40,4 +41,11 @@ class MethodLevelErrors extends RemoteException {
class CannotCalculateChangesMethodResponseException extends MethodLevelErrors {
CannotCalculateChangesMethodResponseException({String? message}) : super(ErrorMethodResponse.cannotCalculateChanges, message: message);
}
class NoNetworkError extends RemoteException {
const NoNetworkError() : super(message: RemoteException.noNetworkError);
@override
List<Object?> get props => [message];
}