From 3b5e8dd5584541180dc3d678f8be2347699bf0cd Mon Sep 17 00:00:00 2001 From: tanlongsheng <252620078@qq.com> Date: Wed, 13 Aug 2025 20:05:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B7=B3=E8=BF=87?= =?UTF-8?q?=E6=8C=87=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/widgets/intro_overlay_builder.dart | 65 +++++++++++++++++---- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/lib/core/widgets/intro_overlay_builder.dart b/lib/core/widgets/intro_overlay_builder.dart index 87101729b..a4a6c70b0 100644 --- a/lib/core/widgets/intro_overlay_builder.dart +++ b/lib/core/widgets/intro_overlay_builder.dart @@ -31,12 +31,27 @@ class IntroOverlayBuilder { ), ), if (onNext != null) - _button( - '下一步', - () { - params.onNext!(); - onNext(); - }, + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(right: 50.w), + child: _button( + '下一步', + () { + params.onNext!(); + onNext(); + }, + ), + ), + _button( + '跳过', + () { + params.onFinish(); + }, + isSkip: true, + ), + ], ), ], ); @@ -83,17 +98,43 @@ class IntroOverlayBuilder { onFinish(); }, ), + const Spacer(), + _button( + '跳过', + () { + params.onFinish(); + }, + isSkip: true, + ), ], ), ], ); } - static Widget _button(String text, Function() onTap) { - return _AnimatedBorderButton( - text: text, - onTap: onTap, - ); + static Widget _button(String text, Function() onTap, {bool isSkip = false}) { + return isSkip + ? GestureDetector( + onTap: onTap, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 5.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20.r), + border: Border.all(color: Colors.white), + ), + child: Text( + text, + style: TextStyle( + fontSize: 14.sp, + color: Colors.white, + ), + ), + ), + ) + : _AnimatedBorderButton( + text: text, + onTap: onTap, + ); } } @@ -208,7 +249,7 @@ class _AnimatedBorderButtonState extends State<_AnimatedBorderButton> borderRadius: 20.r, ), child: Container( - padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 5.w), + padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 5.w), decoration: BoxDecoration( borderRadius: BorderRadius.circular(20.r), border: Border.all(color: Colors.transparent), From 212944ed71c506bdf50956473a007e9b8b05f606 Mon Sep 17 00:00:00 2001 From: tanlongsheng <252620078@qq.com> Date: Wed, 13 Aug 2025 20:46:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E6=89=8B?= =?UTF-8?q?=E6=8C=87=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/widgets/intro_overlay_builder.dart | 2 +- lib/data/services/novice_guide_service.dart | 7 +++---- lib/modules/agent/views/agent_view.dart | 4 +++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/core/widgets/intro_overlay_builder.dart b/lib/core/widgets/intro_overlay_builder.dart index a4a6c70b0..fec06693e 100644 --- a/lib/core/widgets/intro_overlay_builder.dart +++ b/lib/core/widgets/intro_overlay_builder.dart @@ -98,7 +98,7 @@ class IntroOverlayBuilder { onFinish(); }, ), - const Spacer(), + if (onNext != null || onFinish != null) const Spacer(), _button( '跳过', () { diff --git a/lib/data/services/novice_guide_service.dart b/lib/data/services/novice_guide_service.dart index 0f908bb69..c58b1a312 100644 --- a/lib/data/services/novice_guide_service.dart +++ b/lib/data/services/novice_guide_service.dart @@ -14,7 +14,7 @@ class NoviceGuideService extends GetxService { StreamSubscription? _statusSubscription; bool isHomeGuide = true; - bool isAIGuide = false; + bool isAIGuide = true; RxBool isWakeup = false.obs; @@ -28,7 +28,6 @@ class NoviceGuideService extends GetxService { 'end': '小言能实时为你播报天气,试试其他指令吧', 'method': () async { // 天气查询需要位置权限 - await PermissionUtil.instance.requestPermission( permissionType: Permission.location, permissionName: 'locationInfo'.tr, // 位置信息 @@ -128,8 +127,8 @@ class NoviceGuideService extends GetxService { @override void onInit() { super.onInit(); - // isHomeGuide = _storage.read('home_guide') ?? false; - // isAIGuide = _storage.read('ai_guide') ?? false; + isHomeGuide = _storage.read('home_guide') ?? false; + isAIGuide = _storage.read('ai_guide') ?? false; } @override diff --git a/lib/modules/agent/views/agent_view.dart b/lib/modules/agent/views/agent_view.dart index 2d7af6881..c78eb62d3 100644 --- a/lib/modules/agent/views/agent_view.dart +++ b/lib/modules/agent/views/agent_view.dart @@ -212,7 +212,9 @@ class _AgentViewState extends State with WidgetsBindingObserver { () => IntroOverlayBuilder.homeBuilder( params, false, - title: '小言正在思考中~', + title: controller.newAIReplyCompleted.value + ? '小言已经完成了回答!' + : '小言正在思考中~', onNext: controller.newAIReplyCompleted.value ? () {} : null, ), );