recordFlutterError function
Implementation
Future recordFlutterError(FlutterErrorDetails error) async {
if (!kReleaseMode) {
// In development mode simply print to console.
FlutterError.dumpErrorToConsole(error);
}
// return Crashlytics.instance.recordFlutterError(error);
print(error.exception);
print(error.stack);
}