flutter_bugly_plugin
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_LOGS" />
final request = err.request;
final response = err.response;
final requestString = json.encode({
"url": request.path,
"header": json.encode(request.headers),
"query": json.encode(request.queryParameters),
"data": json.encode(request.data),
});
final responseString = json.encode({
"statusCode": response.statusCode,
"data": json.encode(response.data)
});
// userInfo必须是{String, String}, Android限制
FlutterBuglyPlugin.reportException(exceptionName: err.type.toString(), reason: err.toString(), userInfo: {
"request": requestString,
"response": responseString,
});