Browse Source

fix: 添加新手引导点击事件处理

在home_view和agent_view中添加onTap事件处理,确保点击时执行onNext回调并启动唤醒监听
weicu
lxm 1 year ago
parent
commit
6b15d61b2e
  1. 8
      lib/modules/agent/views/agent_view.dart
  2. 4
      lib/modules/home/views/home_view.dart

8
lib/modules/agent/views/agent_view.dart

@ -521,6 +521,14 @@ class _AgentViewState extends State<AgentView> with WidgetsBindingObserver {
controller.noviceGuideService controller.noviceGuideService
.aiStep]['input']; .aiStep]['input'];
}, },
onTap: () {
controller.textController.text =
controller.noviceGuideService
.aiStepsList[
controller.noviceGuideService
.aiStep]['input'];
params.onNext!();
},
); );
}, },
onWidgetLoad: () { onWidgetLoad: () {

4
lib/modules/home/views/home_view.dart

@ -105,6 +105,10 @@ class HomeView extends GetView<HomeController> {
onNext: () { onNext: () {
controller.noviceGuideService.startWakeupListen(); controller.noviceGuideService.startWakeupListen();
}, },
onTap: () {
params.onNext!();
controller.noviceGuideService.startWakeupListen();
},
); );
}, },
builder: (BuildContext context, GlobalKey key) => SizedBox( builder: (BuildContext context, GlobalKey key) => SizedBox(

Loading…
Cancel
Save