uploadException static method

Future<Null> uploadException({
  1. required String message,
  2. required String detail,
  3. Map? data,
})

上报自定义异常信息,data为文本附件 Android 错误分析=>跟踪数据=>extraMessage.txt iOS 错误分析=>跟踪数据=>crash_attach.log

Implementation

static Future<Null> uploadException(
    {required String message, required String detail, Map? data}) async {
  var map = {};
  map.putIfAbsent("crash_message", () => message);
  map.putIfAbsent("crash_detail", () => detail);
  if (data != null) map.putIfAbsent("crash_data", () => data);
  await _channel.invokeMethod('postCatchedException', map);
}