|
|
@ -3,7 +3,6 @@ import 'dart:async'; |
|
|
import '../../../routes/app_routes.dart'; |
|
|
import '../../../routes/app_routes.dart'; |
|
|
import '../../../core/utils/logger.dart'; |
|
|
import '../../../core/utils/logger.dart'; |
|
|
import 'package:flutter/material.dart'; |
|
|
import 'package:flutter/material.dart'; |
|
|
import '../../explore/controllers/explore_controller.dart'; |
|
|
|
|
|
import 'package:classic_bluetooth/classic_bluetooth.dart' show BluetoothDevice; |
|
|
import 'package:classic_bluetooth/classic_bluetooth.dart' show BluetoothDevice; |
|
|
import '../../../data/services/bluetooth_manager.dart'; |
|
|
import '../../../data/services/bluetooth_manager.dart'; |
|
|
import '../../../data/services/ble_manager.dart'; |
|
|
import '../../../data/services/ble_manager.dart'; |
|
|
@ -20,9 +19,6 @@ 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>(); |
|
|
|
|
|
|
|
|
|
|
|
// 连接状态相关 |
|
|
// 连接状态相关 |
|
|
final _connectionStatus = ConnectionStatus.disconnected.obs; |
|
|
final _connectionStatus = ConnectionStatus.disconnected.obs; |
|
|
final _connectionErrorMsg = ''.obs; |
|
|
final _connectionErrorMsg = ''.obs; |
|
|
@ -197,11 +193,6 @@ class HomeController extends GetxController { |
|
|
Get.toNamed(Routes.translation); |
|
|
Get.toNamed(Routes.translation); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// 打开AI伴侣功能 |
|
|
|
|
|
void openAIGirlfriend() { |
|
|
|
|
|
exploreController.onAIFeatureTap(2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// 展示AI功能 |
|
|
/// 展示AI功能 |
|
|
void exploreAIFeatures() { |
|
|
void exploreAIFeatures() { |
|
|
Get.toNamed(Routes.agent); |
|
|
Get.toNamed(Routes.agent); |
|
|
|