diff --git a/.template/lib/di/interceptor/app_interceptor.dart b/.template/lib/di/interceptor/app_interceptor.dart index 7dd9bb97..83dc5092 100644 --- a/.template/lib/di/interceptor/app_interceptor.dart +++ b/.template/lib/di/interceptor/app_interceptor.dart @@ -4,8 +4,12 @@ import 'package:dio/dio.dart'; class AppInterceptor extends Interceptor { final bool _requireAuthenticate; + final Dio _dio; - AppInterceptor(this._requireAuthenticate); + AppInterceptor( + this._requireAuthenticate, + this._dio, + ); @override Future onRequest( diff --git a/.template/lib/di/provider/dio_provider.dart b/.template/lib/di/provider/dio_provider.dart index 8562926a..f015da1a 100644 --- a/.template/lib/di/provider/dio_provider.dart +++ b/.template/lib/di/provider/dio_provider.dart @@ -15,7 +15,10 @@ class DioProvider { Dio _createDio({bool requireAuthenticate = false}) { final dio = Dio(); - final appInterceptor = AppInterceptor(requireAuthenticate); + final appInterceptor = AppInterceptor( + requireAuthenticate, + dio, + ); final interceptors = []; interceptors.add(appInterceptor); if (!kReleaseMode) { diff --git a/.template/lib/utils/wrappers/permission_wrapper.dart b/.template/lib/utils/wrappers/permission_wrapper.dart index e46a7515..b957d9a4 100644 --- a/.template/lib/utils/wrappers/permission_wrapper.dart +++ b/.template/lib/utils/wrappers/permission_wrapper.dart @@ -1,4 +1,3 @@ -import 'package:injectable/injectable.dart'; import 'package:permission_handler/permission_handler.dart' as permission_handler; @@ -10,7 +9,6 @@ abstract class PermissionWrapper { Future isCameraPermissionPermanentlyDenied(); } -@Singleton(as: PermissionWrapper) class PermissionWrapperImpl extends PermissionWrapper { @override Future requestCameraPermission() { diff --git a/.template/pubspec.yaml b/.template/pubspec.yaml index e588cd2b..0a282c0e 100644 --- a/.template/pubspec.yaml +++ b/.template/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.4.0+13 +version: 1.4.0+14 environment: sdk: ">=2.17.5 <3.0.0"