From 4ff93edaabb47eb31992fabc05e2159e7f01856b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=94=8B?= <2535831261@qq.com> Date: Tue, 21 Jul 2026 22:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=88=E6=9D=83=E9=A1=B5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=AE=BE=E5=A4=87=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/features/auth/pages/page_auth.dart | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/features/auth/pages/page_auth.dart b/lib/features/auth/pages/page_auth.dart index fd36026..36838f0 100644 --- a/lib/features/auth/pages/page_auth.dart +++ b/lib/features/auth/pages/page_auth.dart @@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:recording_tool/app/router/app_navigator.dart'; import 'package:recording_tool/core/cache/app_storage.dart'; import 'package:recording_tool/core/cache/storage_keys.dart'; +import 'package:recording_tool/core/utils/device_utils.dart'; import 'package:recording_tool/features/auth/view_model_auth/view_model_auth.dart'; import 'package:recording_tool/features/scan_qrcode/pages/page_scan_qrcode.dart'; import 'package:recording_tool/shared/widgets/widgets.dart'; @@ -86,6 +87,35 @@ class _AuthPageWidgetState extends ConsumerState { ], ), ), + 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, + ), + ), + ], + ), + ), ], ), );