comment crashlytics 'fix'
This commit is contained in:
parent
3a9772558f
commit
e08a049000
|
@ -56,22 +56,22 @@ Future<void> _initializeSystemSettings() async {
|
|||
|
||||
if (kDebugMode) {
|
||||
print('Debug mode');
|
||||
await crashlyticsInstance.setCrashlyticsCollectionEnabled(false);
|
||||
// await crashlyticsInstance.setCrashlyticsCollectionEnabled(false);
|
||||
} else {
|
||||
print('Release mode');
|
||||
await crashlyticsInstance.setCrashlyticsCollectionEnabled(true);
|
||||
// await crashlyticsInstance.setCrashlyticsCollectionEnabled(true);
|
||||
|
||||
// Verifica e envia relatórios não enviados de forma assíncrona
|
||||
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');
|
||||
// });
|
||||
|
||||
// Configura o tratamento de erros não capturados
|
||||
FlutterError.onError = crashlyticsInstance.recordFlutterError;
|
||||
|
|
Loading…
Reference in New Issue