91 lines
3.0 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/main/lockDetail/lockSet/aiAssistant/ai_assistant_logic.dart';
import 'package:star_lock/main/lockDetail/lockSet/aiAssistant/ai_assistant_state.dart';
import 'package:star_lock/tools/commonItem.dart';
import 'package:star_lock/tools/titleAppBar.dart';
class AiAssistantPage extends StatefulWidget {
const AiAssistantPage({Key? key}) : super(key: key);
@override
State<AiAssistantPage> createState() => _AiAssistantPageState();
}
class _AiAssistantPageState extends State<AiAssistantPage> {
final AiAssistantLogic logic = Get.put(AiAssistantLogic());
final AiAssistantState state = Get.find<AiAssistantLogic>().state;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: 'AI助理设置'.tr, haveBack: true, backgroundColor: AppColors.mainColor),
body: Container(
width: 1.sw,
padding: EdgeInsets.symmetric(horizontal: 20.w),
margin: EdgeInsets.only(top: 20.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
'images/other/ai.png',
height: 250.h,
fit: BoxFit.cover,
),
SizedBox(
height: 50.h,
),
Text(
'AI助理的支持依赖网络授权下载打开功能开关时请保证手机数据网络的正常连接'.tr,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.sp,
color: Colors.grey,
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 50.h,
),
CommonItem(
leftTitel: 'Ai语音菜单'.tr,
rightTitle: '',
isHaveLine: true,
// 最后一个元素不显示分割线(取反)
isHaveDirection: false,
isHaveRightWidget: true,
rightWidget: CupertinoSwitch(
value: false,
onChanged: (value) {},
),
action: () {
logic.showToast('功能待开放'.tr);
},
),
CommonItem(
leftTitel: 'Ai智能语音交互'.tr,
rightTitle: '',
isHaveLine: false,
// 最后一个元素不显示分割线(取反)
isHaveDirection: false,
isHaveRightWidget: true,
rightWidget: CupertinoSwitch(
value: false,
onChanged: (value) {},
),
action: () {
logic.showToast('功能待开放'.tr);
},
)
],
),
),
);
}
}