postException static method

Future<void> postException({
  1. String? type,
  2. String? error,
  3. String? stackTrace,
  4. Map<String, String>? extraInfo,
})

上报自定义异常. @param type 错误类型 @param error 错误信息 @param stackTrace 出错堆栈 @param extraInfo 额外信息

Implementation

static Future<void> postException({
  String? type,
  String? error,
  String? stackTrace,
  Map<String, String>? extraInfo,
}) async {
  Map<String, Object?> map = {
    "type": type,
    "error": error,
    "stackTrace": stackTrace,
    "extraInfo": extraInfo,
  };
  _channel.invokeMethod("postException", map);
}