新增网络可视化请求工具

This commit is contained in:
2026-07-22 09:24:48 +08:00
parent 4ff93edaab
commit d6e80df5bf
230 changed files with 92710 additions and 51 deletions
+28 -29
View File
@@ -87,37 +87,36 @@ class _AuthPageWidgetState extends ConsumerState<AuthPageWidget> {
],
),
),
SizedBox(height: 20.h),
Container(
padding: EdgeInsets.symmetric(horizontal: 20.w),
child: Column(
children: [
AppTextField(controller: _controller),
SizedBox(height: 20.h),
SizedBox(
width: double.maxFinite,
child: AppButton(
label: '获取设备码',
onPressed: () async {
final deviceCode = await DeviceUtils.deviceCode();
if (mounted) {
AppDialog.confirm(
context,
title: '设备码',
message: deviceCode,
);
}
;
},
variant: AppButtonVariant.secondary,
isLoading: authState.isLoading,
),
),
],
),
),
..._buildTestArea(authState.isLoading),
],
),
);
}
/// 测试区域
List<Widget> _buildTestArea(bool isLoading) {
return [
SizedBox(height: 20.h),
Container(
padding: EdgeInsets.symmetric(horizontal: 20.w),
child: Column(
children: [
SizedBox(
width: double.maxFinite,
child: AppButton(
label: '获取设备码',
onPressed: () async {
DeviceUtils.deviceCode().then((code) {
AppDialog.confirm(context, title: '设备码', message: code);
});
},
variant: AppButtonVariant.secondary,
isLoading: isLoading,
),
),
],
),
),
];
}
}