WIP - more decoupling of blocs

This commit is contained in:
Anton Stubenbord
2022-12-12 01:29:34 +01:00
parent e2a20cea75
commit 2f31d9c053
51 changed files with 1083 additions and 800 deletions

View File

@@ -34,4 +34,10 @@ class AuthenticationInterceptor implements InterceptorContract {
Future<BaseResponse> interceptResponse(
{required BaseResponse response}) async =>
response;
@override
Future<bool> shouldInterceptRequest() async => true;
@override
Future<bool> shouldInterceptResponse() async => true;
}

View File

@@ -25,4 +25,10 @@ class BaseUrlInterceptor implements InterceptorContract {
Future<BaseResponse> interceptResponse(
{required BaseResponse response}) async =>
response;
@override
Future<bool> shouldInterceptRequest() async => true;
@override
Future<bool> shouldInterceptResponse() async => true;
}

View File

@@ -25,4 +25,10 @@ class LanguageHeaderInterceptor implements InterceptorContract {
Future<BaseResponse> interceptResponse(
{required BaseResponse response}) async =>
response;
@override
Future<bool> shouldInterceptRequest() async => true;
@override
Future<bool> shouldInterceptResponse() async => true;
}

View File

@@ -1,5 +1,4 @@
import 'package:http/http.dart';
import 'package:http_interceptor/http/http.dart';
import 'package:http_interceptor/http_interceptor.dart';
import 'package:injectable/injectable.dart';
const interceptedRoutes = ['thumb/'];
@@ -33,4 +32,10 @@ class ResponseConversionInterceptor implements InterceptorContract {
}
return response;
}
@override
Future<bool> shouldInterceptRequest() async => true;
@override
Future<bool> shouldInterceptResponse() async => true;
}