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