refactor: update deprecated and minor code refactors (#710)

Improve code readability & additional refactoring

Commits:
chore: exclude generated from analyzer

refactor: add SharedPreferences to locator

refactor: access shared pref from locator, and code refactor

refactor: remove unwanted `await`

refactor: remove `const` from `CacheConfig`
This commit is contained in:
Sailesh Dahal 2023-02-21 18:06:56 +05:45 committed by EvadeMaster
parent 3ae4d69110
commit 6829d3cdea
No known key found for this signature in database
GPG key ID: 90BAB50981420F89
15 changed files with 97 additions and 96 deletions

View file

@ -42,7 +42,7 @@ class GithubAPI {
captureFailedRequests: true,
);
} on Exception catch (e, s) {
await Sentry.captureException(e, stackTrace: s);
Sentry.captureException(e, stackTrace: s).ignore();
}
}
@ -50,7 +50,7 @@ class GithubAPI {
try {
await _dioCacheManager.clearAll();
} on Exception catch (e, s) {
await Sentry.captureException(e, stackTrace: s);
Sentry.captureException(e, stackTrace: s).ignore();
}
}
@ -62,7 +62,7 @@ class GithubAPI {
);
return response.data[0];
} on Exception catch (e, s) {
await Sentry.captureException(e, stackTrace: s);
Sentry.captureException(e, stackTrace: s).ignore();
return null;
}
}
@ -93,7 +93,7 @@ class GithubAPI {
)
.toList();
} on Exception catch (e, s) {
await Sentry.captureException(e, stackTrace: s);
Sentry.captureException(e, stackTrace: s).ignore();
return List.empty();
}
}
@ -113,7 +113,7 @@ class GithubAPI {
}
}
} on Exception catch (e, s) {
await Sentry.captureException(e, stackTrace: s);
Sentry.captureException(e, stackTrace: s).ignore();
return null;
}
return null;
@ -128,7 +128,7 @@ class GithubAPI {
patches = list.map((patch) => Patch.fromJson(patch)).toList();
}
} on Exception catch (e, s) {
await Sentry.captureException(e, stackTrace: s);
Sentry.captureException(e, stackTrace: s).ignore();
return List.empty();
}
return patches;
@ -143,7 +143,7 @@ class GithubAPI {
return 'Unknown';
}
} on Exception catch (e, s) {
await Sentry.captureException(e, stackTrace: s);
Sentry.captureException(e, stackTrace: s).ignore();
return '';
}
}