You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../../core/utils/ai_navigation.dart';
|
|
import '../../data/services/device_location_service.dart';
|
|
import '../../routes/app_routes.dart';
|
|
import '../module_descriptor.dart';
|
|
import 'bindings/emai_binding.dart';
|
|
import 'views/emai_view.dart';
|
|
|
|
/// EMAI 助手(阿里百炼多模态对话)
|
|
final AgentModuleDescriptor emaiModule = AgentModuleDescriptor(
|
|
id: 'emaiAssistant',
|
|
title: 'agentEmai',
|
|
subtitle: 'agentEmaiDesc',
|
|
icon: Icons.auto_awesome,
|
|
gradient: const [Color(0xFF5B8DEF), Color(0xFF7E57C2)],
|
|
// 按 agentType 走移动精灵或 EMAI 页
|
|
onLaunch: navigateToAIAssistant,
|
|
// 位置缓存给手机页和耳机唤醒共用。手机页在 Dart Start 里读,
|
|
// 耳机按键唤醒由原生 Start 写入同一份缓存,这里只保证服务在。
|
|
registerServices: () {
|
|
if (!Get.isRegistered<DeviceLocationService>()) {
|
|
Get.put<DeviceLocationService>(DeviceLocationService(), permanent: true);
|
|
}
|
|
},
|
|
pages: [
|
|
GetPage(
|
|
name: Routes.emai,
|
|
page: () => const EmaiView(),
|
|
binding: EmaiBinding(),
|
|
transition: Transition.rightToLeft,
|
|
transitionDuration: const Duration(milliseconds: 250),
|
|
),
|
|
],
|
|
);
|
|
|