handle method

  1. @override
Future<bool> handle(
  1. Report report,
  2. BuildContext? context
)
override

Method called when report has been accepted by user

Implementation

@override
Future<bool> handle(Report report, BuildContext? context) {
  logger.info(
    "============================== Tracker LOG ==============================",
  );
  logger.info("Crash occurred on ${report.dateTime}");
  logger.info("");
  if (enableDeviceParameters) {
    _printDeviceParametersFormatted(report.deviceParameters);
    logger.info("");
  }
  if (enableApplicationParameters) {
    _printApplicationParametersFormatted(report.applicationParameters);
    logger.info("");
  }
  logger.info("---------- ERROR ----------");
  logger.info("${report.error}");
  logger.info("");
  if (enableStackTrace) {
    _printStackTraceFormatted(report.stackTrace as StackTrace?);
  }
  if (enableCustomParameters) {
    _printCustomParametersFormatted(report.customParameters);
  }
  logger.info(
    "======================================================================",
  );
  return Future.value(true);
}