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) async {
  if (report.platformType != PlatformType.web &&
      !(await Catcher2Utils.isInternetConnectionAvailable())) {
    _printLog('No internet connection available');
    return false;
  }

  if (requestType == HttpRequestType.post) {
    return _sendPost(report);
  }
  return true;
}