You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
value isIterable? value.map((v) => v.toString()).toList() : [value],
),
);
【修改方法】为将 value 转为 String 类型: value is Iterable ? value.map((v) => v.toString()).toList() : [value.toString()],
dio添加添加参数{"key":1}
正常进行网络请求
打开 ume 的 DioInspector 找到刚刚的网络请求,并点击【详情】,页面报错
查看日志提示:type 'int' is not a subtype of type 'String'
Expected results 期望结果:
预期正常展示网络请求详情 Actual results 实际结果:
实际上请求出错:
Error log 错误日志
The following _TypeError was thrown building ValueListenableBuilder<bool>(dirty, state: _ValueListenableBuilderState<bool>#08b6e):type'int' is not a subtype of type'String'The relevant error-causing widget was: DioInspector DioInspector:file:///Users/username/dev/workspace/work/project_name/lib/main.dart:30:7When the exception was thrown, this was the stack: #0 _ResponseCardState._requestHeadersBuilder.<anonymous closure> (package:flutter_ume_kit_dio_plus/src/widgets/pluggable_state.dart:232:72)<--这里出错#1 MapBase.map (dart:collection/maps.dart:82:28)#2 _ResponseCardState._requestHeadersBuilder (package:flutter_ume_kit_dio_plus/src/widgets/pluggable_state.dart:229:60)#3 _ResponseCardState._detailedContent.<anonymous closure> (package:flutter_ume_kit_dio_plus/src/widgets/pluggable_state.dart:353:26)#4 _ValueListenableBuilderState.build (package:flutter/src/widgets/value_listenable_builder.dart:186:26)#5 StatefulElement.build (package:flutter/src/widgets/framework.dart:5198:27)#6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5086:15)#7 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)#8 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)#9 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2780:19)#10 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:903:21)#11 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:358:5)#12 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1284:15)#13 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1214:9)#14 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1072:5)#15 _invoke (dart:ui/hooks.dart:142:13)#16 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:359:5)#17 _drawFrame (dart:ui/hooks.dart:112:31)
Environmental info 环境信息
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.10.5, on macOS 13.4.1 22F770820d darwin-arm64, locale en-CN)
Steps to Reproduce 复现步骤
这里第 236 行的代码有漏洞,如果
headers
里面的参数值为数字等非 String 的话则会出错。flutter_ume/kits/flutter_ume_kit_dio/lib/src/widgets/pluggable_state.dart
Lines 233 to 238 in e66342d
【修改方法】为将 value 转为 String 类型:
value is Iterable ? value.map((v) => v.toString()).toList() : [value.toString()],
type 'int' is not a subtype of type 'String'
Expected results 期望结果:
预期正常展示网络请求详情
Actual results 实际结果:
实际上请求出错:
Error log 错误日志
Environmental info 环境信息
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [!] Flutter (Channel stable, 3.10.5, on macOS 13.4.1 22F770820d darwin-arm64, locale en-CN)
UME and kits version UME 及插件包版本
The text was updated successfully, but these errors were encountered: