diff --git a/lan/lan_en.json b/lan/lan_en.json index 2d48d88e..7bfa2b3c 100755 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -905,5 +905,11 @@ "感应到门前约0.5米有人时,将自动启动面部识别开锁。": "When someone is sensed about 0.5 meters in front of the door, the face recognition unlocking will be automatically started.", "感应距离已关闭,需手动触摸键盘任意键,进行面部识别开锁。": "The sensing distance has been turned off, you need to manually touch any key on the keyboard to perform face recognition unlocking.", "防误开已打开,开锁后": "The anti-mistake opening has been turned on, and after unlocking", - "秒内不可使用面容开锁": "Face unlocking cannot be used within seconds" + "秒内不可使用面容开锁": "Face unlocking cannot be used within seconds", + "Amazon Alexa": "Amazon Alexa", + "您可以使用Alexa进行开锁、闭锁和查看锁状态": "You can use Alexa to unlock, lock, and view the lock status", + "支持的国家": "Supported countries", + "支持的国家值":"United States, Canada, United Kingdom, Germany, France, Italy, Spain, Australia, New Zealand, India, Japan", + "操作流程": "Operation process", + "操作流程值": "1. Open the Alexa app and search for the Skye Smart Lock skill\n2. Click Enable Skill and log in to your Skye account\n3. Say 'Alexa, discover devices' to Alexa\n4. After discovering the device, you can use the voice command to control the lock" } diff --git a/lan/lan_keys.json b/lan/lan_keys.json index 48eb4db3..9bb0e557 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -941,5 +941,11 @@ "感应到门前约0.5米有人时,将自动启动面部识别开锁。": "感应到门前约0.5米有人时,将自动启动面部识别开锁。", "感应距离已关闭,需手动触摸键盘任意键,进行面部识别开锁。": "感应距离已关闭,需手动触摸键盘任意键,进行面部识别开锁。", "防误开已打开,开锁后": "防误开已打开,开锁后", - "秒内不可使用面容开锁": "秒内不可使用面容开锁" + "秒内不可使用面容开锁": "秒内不可使用面容开锁", + "Amazon Alexa": "Amazon Alexa", + "您可以使用Alexa进行开锁、闭锁和查看锁状态":"您可以使用Alexa进行开锁、闭锁和查看锁状态", + "支持的国家":"支持的国家", + "支持的国家值":"支持的国家值", + "操作流程":"操作流程", + "操作流程值":"操作流程值" } diff --git a/lan/lan_zh.json b/lan/lan_zh.json index 39900100..81fb3c14 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -901,5 +901,11 @@ "感应到门前约0.5米有人时,将自动启动面部识别开锁。": "感应到门前约0.5米有人时,将自动启动面部识别开锁。", "感应距离已关闭,需手动触摸键盘任意键,进行面部识别开锁。": "感应距离已关闭,需手动触摸键盘任意键,进行面部识别开锁。", "防误开已打开,开锁后": "防误开已打开,开锁后", - "秒内不可使用面容开锁": "秒内不可使用面容开锁" + "秒内不可使用面容开锁": "秒内不可使用面容开锁", + "Amazon Alexa": "Amazon Alexa", + "您可以使用Alexa进行开锁、闭锁和查看锁状态": "您可以使用Alexa进行开锁、闭锁和查看锁状态", + "支持的国家": "支持的国家", + "支持的国家值": "美国、加拿大、英国、澳大利亚、印度、德国、法国、意大利、西班牙、日本", + "操作流程": "操作流程", + "操作流程值":"1 用智能锁APP添加锁和网关\n\n2 在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Alexa \n\n3 在Alexa中添加Skill,并用智能锁APP的账号和密码进行授权。授权成功后就可以发现账号下的设备\n\n4 在Alexa app里找到锁,开启语音开锁的功能,并设置语言密码\n\n5 可以通过Alexa操作锁了" } diff --git a/lib/app_settings/app_colors.dart b/lib/app_settings/app_colors.dart index 17be1c83..ae6259ec 100755 --- a/lib/app_settings/app_colors.dart +++ b/lib/app_settings/app_colors.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:star_lock/flavors.dart'; @@ -130,6 +129,9 @@ class AppColors { static const blueTextTipsColor = Color.fromRGBO(0, 113, 255, 1); //蓝色字体tips static const blueViewBgColor = Color.fromRGBO(223, 237, 254, 1); //蓝色背景板 139 148 176 + static const lightBlueBgColor = + Color.fromRGBO(223, 237, 254, 0.3); //浅蓝色背景板 139 148 176 + static const msgNoticeTextColor = Color.fromRGBO(139, 148, 176, 1); //消息提醒字体颜色 static const alphaBgViewColor = Color.fromRGBO(0, 0, 0, 0.2); //透明度背景 static const vipFeatureBgColor = diff --git a/lib/mine/mineSet/amazon_alexa/amazon_alexa_page.dart b/lib/mine/mineSet/amazon_alexa/amazon_alexa_page.dart index 4be9355c..69e525e6 100644 --- a/lib/mine/mineSet/amazon_alexa/amazon_alexa_page.dart +++ b/lib/mine/mineSet/amazon_alexa/amazon_alexa_page.dart @@ -12,35 +12,47 @@ class AmazonAlexaPage extends StatefulWidget { } class _AmazonAlexaPageState extends State { + final TextStyle _titleStyle = TextStyle( + color: Colors.black, + fontSize: 26.sp, + fontWeight: FontWeight.w500, + ); + + final TextStyle _descriptionStyle = TextStyle( + color: AppColors.darkGrayTextColor, + fontSize: 20.sp, + ); + + final EdgeInsets _contentPadding = + EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h); + @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.mainBackgroundColor, - resizeToAvoidBottomInset: false, - appBar: TitleAppBar( - barTitle: 'Amazon Alexa'.tr, - haveBack: true, - backgroundColor: AppColors.mainColor, + 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(), + ], ), - 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), + padding: EdgeInsets.symmetric(vertical: 45.h), child: Column( children: [ Image.asset( @@ -48,25 +60,14 @@ class _AmazonAlexaPageState extends State { width: 78.w, height: 78.w, ), - SizedBox( - height: 30.h, - ), + SizedBox(height: 30.h), + Text('Amazon Alexa'.tr, style: _titleStyle), + SizedBox(height: 10.h), Text( - 'Amazon Alexa'.tr, - style: TextStyle( - color: Colors.black, - fontSize: 26.sp, - fontWeight: FontWeight.w500, - ), + '您可以使用Alexa进行开锁、闭锁和查看锁状态'.tr, + style: _descriptionStyle, + textAlign: TextAlign.center, ), - SizedBox( - height: 10.h, - ), - Text('您可以使用Alexa进行开锁、闭锁和查看锁状态'.tr, - style: TextStyle( - color: AppColors.darkGrayTextColor, - fontSize: 20.sp, - )), ], ), ); @@ -76,15 +77,39 @@ class _AmazonAlexaPageState extends State { 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( + padding: _contentPadding, + child: Column( children: [ - // Row( - // children: [ImageIcon(), Text('支持的国家')], - // ), + _buildInfoSection('支持的国家'.tr, '支持的国家值'.tr), + SizedBox(height: 20.h), + _buildInfoSection('操作流程'.tr, '操作流程值'.tr), ], ), ); } + + Widget _buildInfoSection(String title, String content) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon(Icons.radio_button_checked_outlined, + color: AppColors.mainColor), + SizedBox(width: 6.w), + Text(title.tr, style: TextStyle(fontSize: 20.sp)), + ], + ), + Container( + margin: EdgeInsets.only(top: 10.h, left: 10.w), + padding: EdgeInsets.all(10.w), + decoration: BoxDecoration( + color: AppColors.lightBlueBgColor, + borderRadius: BorderRadius.circular(6), + ), + child: Text(content.tr, style: TextStyle(fontSize: 20.sp)), + ), + ], + ); + } } diff --git a/lib/mine/mineSet/mineSet/mineSet_page.dart b/lib/mine/mineSet/mineSet/mineSet_page.dart index c141d4a2..f84c1ad4 100755 --- a/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -328,7 +328,7 @@ class _MineSetPageState extends State height: 10.h, ), CommonItem( - leftTitel: 'Amazon Alexa', + leftTitel: 'Amazon Alexa'.tr, rightTitle: '', isHaveLine: true, isHaveDirection: true, diff --git a/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart b/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart index 3c56dcf5..bba7972a 100755 --- a/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart +++ b/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart @@ -116,7 +116,7 @@ class _ValueAddedServicesPageListState fontWeight: FontWeight.w600), ), 'Amazon Alexa', () { - EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds); + Get.toNamed(Routers.amazonAlexaPage); }), if (!F.isProductionEnv) _valueAddedServicesItem(