1import 'package:dio/dio.dart';
3import '../constants/strings.dart';
4import '../storage/flutter_secure_storage.dart';
17 RequestInterceptorHandler handler,
21 options.headers[
'Authorization'] =
'Bearer $token';
30 ErrorInterceptorHandler handler,
32 if (err.response?.statusCode == 401) {
35 return handler.next(err);
AuthInterceptor({required this.dio})
final _tokenSecureStorage
final _sessionSecureStorage
Future< void > _handleTokenExpiration() async
override void onRequest(RequestOptions options, RequestInterceptorHandler handler,) async
override void onError(DioException err, ErrorInterceptorHandler handler,) async
static const String sessionKey
static const String tokenKey
class EnergySavingsMeasure extends StatefulWidget options