wrap static method

dynamic wrap(
  1. dynamic f(
    1. FlutterErrorDetails fed
    )?,
  2. String type
)

Implementation

static dynamic wrap(
    dynamic Function(FlutterErrorDetails fed)? f, String type) {
  if (f != null) {
    final Function(FlutterErrorDetails fed) copyF = f;

    return (FlutterErrorDetails fed) {
      final dynamic result = copyF(fed);
      tlLogger.v("!!! Reporting onError from wrapped callback");
      PluginTealeaf.onTlException(data: errorDetailsHelper(fed, type));
      return result;
    };
  }
  return null;
}