feat : change app inspector and exception handling
This commit is contained in:
@@ -4,15 +4,21 @@ import 'package:rasadyar_core/core.dart';
|
||||
import '../di/auth_di.dart';
|
||||
import 'constant.dart';
|
||||
|
||||
/*
|
||||
class DioRemoteManager {
|
||||
DioRemote? _currentClient;
|
||||
ApiEnvironment? _currentEnv;
|
||||
|
||||
Future<DioRemote> setEnvironment([
|
||||
ApiEnvironment env = ApiEnvironment.dam,
|
||||
]) async {
|
||||
Future<DioRemote> setEnvironment([ApiEnvironment env = ApiEnvironment.dam]) async {
|
||||
if (_currentEnv != env) {
|
||||
_currentClient = DioRemote(baseUrl: env.baseUrl);
|
||||
_currentClient = DioRemote(
|
||||
baseUrl: env.baseUrl,
|
||||
interceptors: AppInterceptor(
|
||||
refreshTokenCallback: () async{
|
||||
return null;
|
||||
},
|
||||
),
|
||||
);
|
||||
await _currentClient?.init();
|
||||
_currentEnv = env;
|
||||
}
|
||||
@@ -39,7 +45,6 @@ Future<void> switchAuthEnvironment(ApiEnvironment env) async {
|
||||
await diAuth.unregister<AuthRepositoryImpl>();
|
||||
}
|
||||
|
||||
diAuth.registerLazySingleton<AuthRepositoryImpl>(
|
||||
() => AuthRepositoryImpl(dioRemote),
|
||||
);
|
||||
diAuth.registerLazySingleton<AuthRepositoryImpl>(() => AuthRepositoryImpl(dioRemote));
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user