enable crashlyticsCOllection
This commit is contained in:
parent
e21d5b5e53
commit
6ac6e15009
|
@ -60,21 +60,21 @@ Future<void> _initializeSystemSettings() async {
|
||||||
print('Release mode');
|
print('Release mode');
|
||||||
final crashlyticsInstance = FirebaseCrashlytics.instance;
|
final crashlyticsInstance = FirebaseCrashlytics.instance;
|
||||||
|
|
||||||
// await crashlyticsInstance.setCrashlyticsCollectionEnabled(true);
|
await crashlyticsInstance.setCrashlyticsCollectionEnabled(true);
|
||||||
if (crashlyticsInstance.isCrashlyticsCollectionEnabled) {
|
if (crashlyticsInstance.isCrashlyticsCollectionEnabled) {
|
||||||
// Configura o tratamento de erros não capturados
|
// Configura o tratamento de erros não capturados
|
||||||
FlutterError.onError = crashlyticsInstance.recordFlutterError;
|
FlutterError.onError = crashlyticsInstance.recordFlutterError;
|
||||||
|
|
||||||
// crashlyticsInstance.checkForUnsentReports().then((unsentReports) {
|
crashlyticsInstance.checkForUnsentReports().then((unsentReports) {
|
||||||
// if (unsentReports) {
|
if (unsentReports) {
|
||||||
// crashlyticsInstance.sendUnsentReports();
|
crashlyticsInstance.sendUnsentReports();
|
||||||
// print('Existem relatórios de falhas não enviados.');
|
print('Existem relatórios de falhas não enviados.');
|
||||||
// } else {
|
} else {
|
||||||
// print('Todos os relatórios de falhas foram enviados.');
|
print('Todos os relatórios de falhas foram enviados.');
|
||||||
// }
|
}
|
||||||
// }).catchError((error) {
|
}).catchError((error) {
|
||||||
// print('Erro ao verificar ou enviar relatórios não enviados: $error');
|
print('Erro ao verificar ou enviar relatórios não enviados: $error');
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
print('Crashlytics enabled');
|
print('Crashlytics enabled');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue