recordDartError function
Implementation
Future recordDartError(Object error, StackTrace stackTrace) async {
// Whenever an error occurs, call the `reportCrash` function. This will send
// Dart errors to our dev console or Crashlytics depending on the environment.
if (!kReleaseMode) {
// In development mode simply print to console.
print(error);
print(stackTrace);
}
// return Crashlytics.instance.recordError(error, stackTrace);
print(error);
print(stackTrace);
}