feat: make firebase crashlytics optional.

This commit is contained in:
Aunali321 2022-10-15 18:29:50 +05:30
parent 79aca0e579
commit f31a60d9bb
5 changed files with 58 additions and 7 deletions

View file

@ -91,6 +91,15 @@ class ManagerAPI {
print('Sentry status: $value');
}
bool isCrashlyticsEnabled() {
return _prefs.getBool('crashlyticsEnabled') ?? true;
}
Future<void> setCrashlyticsStatus(bool value) async {
await _prefs.setBool('crashlyticsEnabled', value);
print('Crashlytics status: $value');
}
List<PatchedApplication> getPatchedApps() {
List<String> apps = _prefs.getStringList('patchedApps') ?? [];
return apps.map((a) => PatchedApplication.fromJson(jsonDecode(a))).toList();