feat: 新增Amazon Alexa入口及UI框架
This commit is contained in:
parent
e9d4a0bf72
commit
b387c7ef03
BIN
images/mine/icon_mine_amazon.png
Normal file
BIN
images/mine/icon_mine_amazon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart';
|
||||
import 'package:star_lock/flavors.dart';
|
||||
@ -44,6 +43,7 @@ import 'package:star_lock/mine/about/webviewShow_page.dart';
|
||||
import 'package:star_lock/mine/mine/safeVerify/safeVerify_page.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart';
|
||||
import 'package:star_lock/mine/mineSet/amazon_alexa/amazon_alexa_page.dart';
|
||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorAssociationLock/administratorAssociationLock_page.dart';
|
||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorChangeDate/adminDetailChangeDate_page.dart';
|
||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart';
|
||||
@ -411,8 +411,10 @@ abstract class Routers {
|
||||
static const lockUserListPage = '/lockUserListPage'; //锁用户列表
|
||||
static const administratorDetailsPage = '/administratorDetailsPage'; //管理员详情
|
||||
static const expireLockManagePage = '/expireLockManagePage'; //即将到期
|
||||
static const expireKeyChangeDatePage = '/ExpireKeyChangeDatePage'; //即将到期卡、指纹、遥控钥匙详情修改日期
|
||||
static const expireKeyChangeValidityDatePage = '/ExpireKeyChangeValidityDatePage'; //即将到期卡、指纹、遥控钥匙详情修改循环日期
|
||||
static const expireKeyChangeDatePage =
|
||||
'/ExpireKeyChangeDatePage'; //即将到期卡、指纹、遥控钥匙详情修改日期
|
||||
static const expireKeyChangeValidityDatePage =
|
||||
'/ExpireKeyChangeValidityDatePage'; //即将到期卡、指纹、遥控钥匙详情修改循环日期
|
||||
static const adminDetailChangeDatePage =
|
||||
'/adminDetailChangeDatePage'; //管理员详情修改生效时间
|
||||
static const String adminLockListPage = '/adminLockListPage'; //管理员详情的锁列表
|
||||
@ -451,8 +453,10 @@ abstract class Routers {
|
||||
|
||||
static const String remoteControlListPage = '/RemoteControlListPage'; // 遥控列表
|
||||
static const String addRemoteControlPage = '/AddRemoteControlPage'; // 添加遥控
|
||||
static const String addRemoteControlTypePage = '/AddRemoteControlTypePage'; // 添加遥控类型
|
||||
static const String remoteControlDetailPage = '/RemoteControlDetailPage'; // 遥控详情
|
||||
static const String addRemoteControlTypePage =
|
||||
'/AddRemoteControlTypePage'; // 添加遥控类型
|
||||
static const String remoteControlDetailPage =
|
||||
'/RemoteControlDetailPage'; // 遥控详情
|
||||
|
||||
static const String cardListPage = '/CardListPage'; // 卡列表
|
||||
// static const addCardTypeManagePage = '/AddCardTypeManagePage'; // 添加卡
|
||||
@ -498,6 +502,7 @@ abstract class Routers {
|
||||
static const String doorLockLogDetailPage = '/doorLockLogDetailPage'; //操作记录详情
|
||||
|
||||
static const String login = '/login'; //登录
|
||||
static const String amazonAlexaPage = '/amazonAlexaPage'; //AmazonAlexa
|
||||
}
|
||||
|
||||
abstract class AppRouters {
|
||||
@ -1128,8 +1133,7 @@ abstract class AppRouters {
|
||||
GetPage<dynamic>(
|
||||
name: Routers.palmListPage, page: () => const PalmListPage()),
|
||||
GetPage<dynamic>(
|
||||
name: Routers.addPalmTypePage,
|
||||
page: () => const AddPalmTypePage()),
|
||||
name: Routers.addPalmTypePage, page: () => const AddPalmTypePage()),
|
||||
GetPage<dynamic>(
|
||||
name: Routers.addPalmPage, page: () => const AddPalmPage()),
|
||||
GetPage<dynamic>(
|
||||
@ -1153,14 +1157,20 @@ abstract class AppRouters {
|
||||
name: Routers.viewExportRecordPage,
|
||||
page: () => const ViewExportRecordPage()),
|
||||
GetPage<dynamic>(
|
||||
name: Routers.expireKeyChangeValidityDatePage, page: () => const ExpireKeyChangeValidityDatePage()),
|
||||
name: Routers.expireKeyChangeValidityDatePage,
|
||||
page: () => const ExpireKeyChangeValidityDatePage()),
|
||||
GetPage<dynamic>(
|
||||
name: Routers.doorLockLogDetailPage, page: () => const DoorLockLogDetailPage()),
|
||||
name: Routers.doorLockLogDetailPage,
|
||||
page: () => const DoorLockLogDetailPage()),
|
||||
GetPage<dynamic>(
|
||||
name: Routers.addRemoteControlTypePage, page: () => const AddRemoteControlTypePage()),
|
||||
name: Routers.addRemoteControlTypePage,
|
||||
page: () => const AddRemoteControlTypePage()),
|
||||
GetPage<dynamic>(
|
||||
name: Routers.remoteControlDetailPage, page: () => const RemoteControlDetailPage()),
|
||||
name: Routers.remoteControlDetailPage,
|
||||
page: () => const RemoteControlDetailPage()),
|
||||
GetPage<dynamic>(
|
||||
name: Routers.palmDetailPage, page: () => const PalmDetailPage()),
|
||||
GetPage<dynamic>(
|
||||
name: Routers.amazonAlexaPage, page: () => const AmazonAlexaPage()),
|
||||
];
|
||||
}
|
||||
|
||||
90
lib/mine/mineSet/amazon_alexa/amazon_alexa_page.dart
Normal file
90
lib/mine/mineSet/amazon_alexa/amazon_alexa_page.dart
Normal file
@ -0,0 +1,90 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
|
||||
class AmazonAlexaPage extends StatefulWidget {
|
||||
const AmazonAlexaPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AmazonAlexaPage> createState() => _AmazonAlexaPageState();
|
||||
}
|
||||
|
||||
class _AmazonAlexaPageState extends State<AmazonAlexaPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: 'Amazon Alexa'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
_buildTopWidget(),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
_buildBottomWidget(),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildTopWidget() {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
width: ScreenUtil().screenWidth,
|
||||
margin: const EdgeInsets.only(left: 0, right: 0, top: 0),
|
||||
padding: EdgeInsets.only(top: 60.h, bottom: 30.h),
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/mine/icon_mine_amazon.png',
|
||||
width: 78.w,
|
||||
height: 78.w,
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Text(
|
||||
'Amazon Alexa'.tr,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 26.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Text('您可以使用Alexa进行开锁、闭锁和查看锁状态'.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor,
|
||||
fontSize: 20.sp,
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBottomWidget() {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
width: ScreenUtil().screenWidth,
|
||||
margin: const EdgeInsets.only(left: 0, right: 0, top: 0, bottom: 0),
|
||||
padding: EdgeInsets.only(top: 60.h, bottom: 30.h),
|
||||
child: const Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [ImageIcon(), Text('支持的国家')],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
0
lib/mine/mineSet/google_home/google_home_page.dart
Normal file
0
lib/mine/mineSet/google_home/google_home_page.dart
Normal file
@ -327,25 +327,23 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
//上架审核注释
|
||||
if (!F.isProductionEnv)
|
||||
CommonItem(
|
||||
leftTitel: 'Amazon Alexa',
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
logic.showToast('功能暂未开放'.tr);
|
||||
}),
|
||||
if (!F.isProductionEnv)
|
||||
CommonItem(
|
||||
leftTitel: 'Google Home',
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
logic.showToast('功能暂未开放'.tr);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: 'Amazon Alexa',
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// logic.showToast('功能暂未开放'.tr);
|
||||
Get.toNamed(Routers.amazonAlexaPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: 'Google Home',
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
logic.showToast('功能暂未开放'.tr);
|
||||
}),
|
||||
if (!F.isProductionEnv)
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.xiaomiIOTPlatform!.tr,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user