TF-2215 Remove LocaleInterceptor

This commit is contained in:
dab246
2024-01-15 14:36:39 +07:00
committed by Dat H. Pham
parent b636422d37
commit c19e56576f
3 changed files with 0 additions and 22 deletions
@@ -1,17 +0,0 @@
import 'dart:io';
import 'package:core/utils/app_logger.dart';
import 'package:dio/dio.dart';
import 'package:tmail_ui_user/main/localizations/localization_service.dart';
class LocaleInterceptor extends InterceptorsWrapper {
@override
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
final currentLocale = LocalizationService.getLocaleFromLanguage();
log('LocaleInterceptor::onRequest:currentLocale: $currentLocale');
options.headers[HttpHeaders.acceptLanguageHeader] = LocalizationService.supportedLocalesToLanguageTags();
options.headers[HttpHeaders.contentLanguageHeader] = currentLocale.toLanguageTag();
super.onRequest(options, handler);
}
}