TF-196 Implement RemoteExceptionThrower when get session
This commit is contained in:
@@ -26,6 +26,7 @@ class NetworkBindings extends Bindings {
|
||||
_bindingDio();
|
||||
_bindingApi();
|
||||
_bindingConnection();
|
||||
_bindingException();
|
||||
}
|
||||
|
||||
void _bindingBaseOption() {
|
||||
@@ -78,4 +79,8 @@ class NetworkBindings extends Bindings {
|
||||
void _bindingConnection() {
|
||||
Get.put(Connectivity());
|
||||
}
|
||||
|
||||
void _bindingException() {
|
||||
Get.put(RemoteExceptionThrower());
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/base/base_bindings.dart';
|
||||
import 'package:tmail_ui_user/features/login/domain/repository/credential_repository.dart';
|
||||
@@ -11,11 +12,6 @@ import 'package:tmail_ui_user/features/session/domain/usecases/get_session_inter
|
||||
|
||||
class SessionBindings extends BaseBindings {
|
||||
|
||||
@override
|
||||
void dependencies() {
|
||||
super.dependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
void bindingsController() {
|
||||
}
|
||||
@@ -27,7 +23,9 @@ class SessionBindings extends BaseBindings {
|
||||
|
||||
@override
|
||||
void bindingsDataSourceImpl() {
|
||||
Get.put(SessionDataSourceImpl(Get.find<SessionAPI>()));
|
||||
Get.put(SessionDataSourceImpl(
|
||||
Get.find<SessionAPI>(),
|
||||
Get.find<RemoteExceptionThrower>()));
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -1448,4 +1448,9 @@ class AppLocalizations {
|
||||
name: 'noPreviewAvailable',
|
||||
);
|
||||
}
|
||||
|
||||
String get wrongUrlMessage {
|
||||
return Intl.message('Server URL is not valid, please try again',
|
||||
name: 'wrongUrlMessage');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user