autoCrashTracker method
Implementation
Future<void> autoCrashTracker() async {
// Non-async exceptions
FlutterError.onError = (details) {
sendException(details.exception, details.stack,isFatal: true);
// if (kReleaseMode) exit(1);
FlutterError.presentError(details);
};
// Async exceptions
PlatformDispatcher.instance.onError = (error, stack) {
sendException(error, stack,isFatal: true);
// if (kReleaseMode) exit(1);
return true;
};
}