|
|
@ -6,6 +6,7 @@ import 'package:flutter_blue_plus/flutter_blue_plus.dart' hide BluetoothDevice; |
|
|
import 'package:flutter/material.dart'; |
|
|
import 'package:flutter/material.dart'; |
|
|
import '../../../data/services/voice_interaction_service.dart'; |
|
|
import '../../../data/services/voice_interaction_service.dart'; |
|
|
import 'package:permission_handler/permission_handler.dart'; |
|
|
import 'package:permission_handler/permission_handler.dart'; |
|
|
|
|
|
import '../../explore/controllers/explore_controller.dart'; |
|
|
|
|
|
|
|
|
// 连接状态枚举 |
|
|
// 连接状态枚举 |
|
|
enum ConnectionStatus { |
|
|
enum ConnectionStatus { |
|
|
@ -17,6 +18,7 @@ enum ConnectionStatus { |
|
|
|
|
|
|
|
|
class HomeController extends GetxController { |
|
|
class HomeController extends GetxController { |
|
|
static HomeController get to => Get.find(); |
|
|
static HomeController get to => Get.find(); |
|
|
|
|
|
final ExploreController exploreController = Get.find<ExploreController>(); |
|
|
|
|
|
|
|
|
// 经典蓝牙服务 |
|
|
// 经典蓝牙服务 |
|
|
late classic.ClassicBluetoothService _bluetoothService; |
|
|
late classic.ClassicBluetoothService _bluetoothService; |
|
|
@ -186,13 +188,13 @@ class HomeController extends GetxController { |
|
|
|
|
|
|
|
|
// 打开AI伴侣功能 |
|
|
// 打开AI伴侣功能 |
|
|
void openAIGirlfriend() { |
|
|
void openAIGirlfriend() { |
|
|
Get.toNamed(Routes.chat); |
|
|
exploreController.onAIFeatureTap(2);//进入AI女友页面 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 展示AI功能 |
|
|
// 展示AI功能 |
|
|
void exploreAIFeatures() { |
|
|
void exploreAIFeatures() { |
|
|
// 简单实现,直接跳转到AI聊天页面 |
|
|
// 简单实现,直接跳转到AI聊天页面 |
|
|
openAIGirlfriend(); |
|
|
Get.toNamed(Routes.chat); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 获取连接状态对应的颜色 |
|
|
// 获取连接状态对应的颜色 |
|
|
|