feat: update rules of analysis_options.yaml. and solved all problems (#665)

* update rules of analysis_options.yaml. and solved all problems

* refactor: fix remaining problems

---------

Co-authored-by: Ushie <ushiekane@gmail.com>
This commit is contained in:
Jay Gajjar
2023-01-30 18:05:06 +05:30
committed by GitHub
parent f5bc1a996f
commit a54ca799b9
62 changed files with 804 additions and 643 deletions

View File

@@ -13,9 +13,11 @@ class CrowdinAPI {
Future<void> initialize() async {
try {
_dio = Dio(BaseOptions(
baseUrl: 'https://api.crowdin.com/api/v2',
));
_dio = Dio(
BaseOptions(
baseUrl: 'https://api.crowdin.com/api/v2',
),
);
_dio.interceptors.add(_dioCacheManager.interceptor);
_dio.addSentry(
@@ -36,7 +38,7 @@ class CrowdinAPI {
Future<List> getLanguages() async {
try {
var response = await _dio.get(
final response = await _dio.get(
'/projects',
options: buildCacheOptions(
const Duration(hours: 6),
@@ -49,7 +51,7 @@ class CrowdinAPI {
),
),
);
List targetLanguages =
final List targetLanguages =
await response.data['data'][0]['data']['targetLanguages'];
return targetLanguages;