Merge branch 'develop' of code.star-lock.cn:StarlockTeam/app-starlock into develop
@ -106,7 +106,7 @@ android {
|
||||
dimension "flavor-type"
|
||||
applicationId "com.skychip.lock"
|
||||
signingConfig signingConfigs.sky
|
||||
resValue "string", "app_name", "锁通通"
|
||||
resValue "string", "app_name", "斯凯智能"
|
||||
manifestPlaceholders.JPUSH_PKGNAME = "com.skychip.lock"
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules-sky.pro'
|
||||
}
|
||||
|
||||
BIN
android/app/src/sky/res/mipmap-hdpi/ic_launcher.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.8 KiB |
BIN
android/app/src/sky/res/mipmap-mdpi/ic_launcher.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
android/app/src/sky/res/mipmap-xhdpi/ic_launcher.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 5.8 KiB |
BIN
android/app/src/sky/res/mipmap-xxhdpi/ic_launcher.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 12 KiB |
BIN
android/app/src/sky/res/mipmap-xxxhdpi/ic_launcher.png
Executable file → Normal file
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 27 KiB |
@ -2,5 +2,5 @@
|
||||
|
||||
FLUTTER_TARGET=lib/main_sky_full.dart
|
||||
ASSET_PREFIX=sky
|
||||
BUNDLE_NAME=锁通通
|
||||
BUNDLE_DISPLAY_NAME=锁通通
|
||||
BUNDLE_NAME=斯凯智能
|
||||
BUNDLE_DISPLAY_NAME=斯凯智能
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
|
||||
FLUTTER_TARGET=lib/main_sky_full.dart
|
||||
ASSET_PREFIX=sky
|
||||
BUNDLE_NAME=锁通通
|
||||
BUNDLE_DISPLAY_NAME=锁通通
|
||||
BUNDLE_NAME=斯凯智能
|
||||
BUNDLE_DISPLAY_NAME=斯凯智能
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
|
||||
FLUTTER_TARGET=lib/main_sky_full.dart
|
||||
ASSET_PREFIX=sky
|
||||
BUNDLE_NAME=锁通通
|
||||
BUNDLE_DISPLAY_NAME=锁通通
|
||||
BUNDLE_NAME=斯凯智能
|
||||
BUNDLE_DISPLAY_NAME=斯凯智能
|
||||
|
||||
@ -1,122 +1,117 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "icon-20@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "icon-20@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "icon-29@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "icon-29@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "icon-40@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "icon-40@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"filename" : "icon-60@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"filename" : "icon-60@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "icon-20@2x 1.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "icon-29@2x 1.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "icon-40@2x 1.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"filename" : "icon-76@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"filename" : "icon-83.5@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"filename" : "icon-1024.png",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 545 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 823 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-1024.png
Normal file
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-20@2x.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-20@3x.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-29@2x.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-29@3x.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-40@2x.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-40@3x.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-60@2x.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-60@3x.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
ios/Runner/Assets.xcassets/skyAppIcon.appiconset/icon-76@2x.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 54 KiB |
@ -911,13 +911,13 @@
|
||||
"支持的国家": "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"
|
||||
"操作流程值": "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",
|
||||
"密码需至少包含数字/字母/字符中的2种组合": "The password must contain at least 2 combinations of numbers/letters/characters",
|
||||
"Google Home": "Google Home",
|
||||
"Action name": "Action name",
|
||||
"ScienerSmart": "ScienerSmart",
|
||||
"支持的语言": "Supported languages",
|
||||
"英语": "English",
|
||||
"Google Home操作流程的值": "1. Open the Google Home app and click the '+' in the upper left corner\n2. Click 'Set up device' and select 'Works with Google'\n3. Search for 'ScienerSmart' and log in to your Skye account\n4. After discovering the device, you can use the voice command to control the lock",
|
||||
"Google Home操作流程的值": "1. Add the lock and gateway with the Smart lock APP\n\n2. Open the remote unlocking function of the lock in the APP (this function is turned off by default). Without this option, the lock does not support Google Home \n\n3. To install the Google Home APP, click the + button in the top left corner\n\n4. On the Settings page, select Work with Google\n\n5. Search for ScienerSmart and authorize with your Smart Lock APP account and password",
|
||||
"开启": "Open"
|
||||
}
|
||||
|
||||
@ -947,8 +947,6 @@
|
||||
"支持的国家":"支持的国家",
|
||||
"支持的国家值":"支持的国家值",
|
||||
"操作流程":"操作流程",
|
||||
"操作流程值":"操作流程值",
|
||||
"秒内不可使用面容开锁": "秒内不可使用面容开锁",
|
||||
|
||||
"密码需至少包含数字/字母/字符中的2种组合": "密码需至少包含数字/字母/字符中的2种组合",
|
||||
"操作流程值":"操作流程值",
|
||||
|
||||
@ -916,6 +916,6 @@
|
||||
"ScienerSmart": "ScienerSmart",
|
||||
"支持的语言": "支持的语言",
|
||||
"英语": "英语",
|
||||
"Google Home操作流程的值": "1.用智能锁APP添加锁和网关\n\n2.在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Google Home \n\n3.安装Google Home APP,点击左上角的“+”按钮\n\n4.在设置页面,选择“与Google协同工作”\n\n5.搜索“ScienerSmart”,并用智能锁APP的账号和密码进行授权\n\n6.在智能锁APP里设置安全码,使用Google Home开锁时提供此安全码",
|
||||
"Google Home操作流程的值": "1.用智能锁APP添加锁和网关\n\n2.在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Google Home \n\n3.安装Google Home APP,点击左上角的“+”按钮\n\n4.在设置页面,选择“与Google协同工作”\n\n5.搜索“ScienerSmart”,并用智能锁APP的账号和密码进行授权\n\n",
|
||||
"开启": "开启"
|
||||
}
|
||||
|
||||
@ -1,9 +1,4 @@
|
||||
class MinePersonInfoEntity {
|
||||
int? errorCode;
|
||||
String? description;
|
||||
String? errorMsg;
|
||||
MinePersonInfoData? data;
|
||||
|
||||
MinePersonInfoEntity(
|
||||
{this.errorCode, this.description, this.errorMsg, this.data});
|
||||
|
||||
@ -14,6 +9,10 @@ class MinePersonInfoEntity {
|
||||
data =
|
||||
json['data'] != null ? MinePersonInfoData.fromJson(json['data']) : null;
|
||||
}
|
||||
int? errorCode;
|
||||
String? description;
|
||||
String? errorMsg;
|
||||
MinePersonInfoData? data;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
@ -28,18 +27,6 @@ class MinePersonInfoEntity {
|
||||
}
|
||||
|
||||
class MinePersonInfoData {
|
||||
String? mobile;
|
||||
int? uid;
|
||||
int? haveSafeAnswer;
|
||||
String? nickname;
|
||||
String? headUrl;
|
||||
String? accountName;
|
||||
int? countryId;
|
||||
String? email;
|
||||
String? countryName;
|
||||
int? isVip;
|
||||
String? deviceId;
|
||||
|
||||
MinePersonInfoData(
|
||||
{this.mobile,
|
||||
this.uid,
|
||||
@ -51,7 +38,10 @@ class MinePersonInfoData {
|
||||
this.email,
|
||||
this.countryName,
|
||||
this.isVip,
|
||||
this.deviceId});
|
||||
this.deviceId,
|
||||
this.lang,
|
||||
this.amazonAlexa,
|
||||
this.googleHome});
|
||||
|
||||
MinePersonInfoData.fromJson(Map<String, dynamic> json) {
|
||||
mobile = json['mobile'];
|
||||
@ -65,7 +55,28 @@ class MinePersonInfoData {
|
||||
countryName = json['countryName'];
|
||||
isVip = json['isVip'];
|
||||
deviceId = json['deviceId'];
|
||||
lang = json['lang'];
|
||||
amazonAlexa = json['amazonAlexa'] != null
|
||||
? AmazonAlexa.fromJson(json['amazonAlexa'])
|
||||
: null;
|
||||
googleHome = json['googleHome'] != null
|
||||
? GoogleHome.fromJson(json['googleHome'])
|
||||
: null;
|
||||
}
|
||||
String? mobile;
|
||||
int? uid;
|
||||
int? haveSafeAnswer;
|
||||
String? nickname;
|
||||
String? headUrl;
|
||||
String? accountName;
|
||||
int? countryId;
|
||||
String? email;
|
||||
String? countryName;
|
||||
int? isVip;
|
||||
String? deviceId;
|
||||
String? lang;
|
||||
AmazonAlexa? amazonAlexa;
|
||||
GoogleHome? googleHome;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
@ -80,6 +91,50 @@ class MinePersonInfoData {
|
||||
data['countryName'] = countryName;
|
||||
data['isVip'] = isVip;
|
||||
data['deviceId'] = deviceId;
|
||||
data['lang'] = lang;
|
||||
if (amazonAlexa != null) {
|
||||
data['amazonAlexa'] = amazonAlexa!.toJson();
|
||||
}
|
||||
if (googleHome != null) {
|
||||
data['googleHome'] = googleHome!.toJson();
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AmazonAlexa {
|
||||
AmazonAlexa({this.skillName, this.langs});
|
||||
|
||||
AmazonAlexa.fromJson(Map<String, dynamic> json) {
|
||||
skillName = json['skillName'];
|
||||
langs = json['langs'].cast<String>();
|
||||
}
|
||||
String? skillName;
|
||||
List<String>? langs;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['skillName'] = skillName;
|
||||
data['langs'] = langs;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GoogleHome {
|
||||
GoogleHome({this.actionName, this.langs});
|
||||
|
||||
GoogleHome.fromJson(Map<String, dynamic> json) {
|
||||
actionName = json['actionName'];
|
||||
langs = json['langs'].cast<String>();
|
||||
}
|
||||
String? actionName;
|
||||
List<String>? langs;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['actionName'] = actionName;
|
||||
data['langs'] = langs;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
6
lib/mine/mineSet/amazon_alexa/amazon_alexa_logic.dart
Normal file
@ -0,0 +1,6 @@
|
||||
import 'package:star_lock/mine/mineSet/amazon_alexa/amazon_alexa_state.dart';
|
||||
import '../../../../tools/baseGetXController.dart';
|
||||
|
||||
class AmazonAlexaLogic extends BaseGetXController {
|
||||
final AmazonAlexaState state = AmazonAlexaState();
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/mine/mineSet/amazon_alexa/amazon_alexa_logic.dart';
|
||||
import 'package:star_lock/mine/mineSet/amazon_alexa/amazon_alexa_state.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
|
||||
@ -25,6 +27,8 @@ class _AmazonAlexaPageState extends State<AmazonAlexaPage> {
|
||||
|
||||
final EdgeInsets _contentPadding =
|
||||
EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h);
|
||||
final AmazonAlexaLogic logic = Get.put(AmazonAlexaLogic());
|
||||
final AmazonAlexaState state = Get.find<AmazonAlexaLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -62,6 +66,11 @@ class _AmazonAlexaPageState extends State<AmazonAlexaPage> {
|
||||
),
|
||||
SizedBox(height: 30.h),
|
||||
Text('Amazon Alexa'.tr, style: _titleStyle),
|
||||
Obx(() => Text(
|
||||
'(Skill name: ${state.amazonAlexaData.value.skillName ?? ''})',
|
||||
style: _descriptionStyle,
|
||||
textAlign: TextAlign.center,
|
||||
)),
|
||||
SizedBox(height: 10.h),
|
||||
Text(
|
||||
'您可以使用Alexa进行开锁、闭锁和查看锁状态'.tr,
|
||||
@ -80,7 +89,8 @@ class _AmazonAlexaPageState extends State<AmazonAlexaPage> {
|
||||
padding: _contentPadding,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildInfoSection('支持的国家'.tr, '支持的国家值'.tr),
|
||||
_buildInfoSection(
|
||||
'支持的国家'.tr, '${state.amazonAlexaData.value.langs?.join('、')}'),
|
||||
SizedBox(height: 20.h),
|
||||
_buildInfoSection('操作流程'.tr, '操作流程值'.tr),
|
||||
],
|
||||
|
||||
13
lib/mine/mineSet/amazon_alexa/amazon_alexa_state.dart
Normal file
@ -0,0 +1,13 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
||||
|
||||
class AmazonAlexaState {
|
||||
AmazonAlexaState() {
|
||||
final Map map = Get.arguments;
|
||||
if (map['amazonAlexaData'] != null) {
|
||||
amazonAlexaData.value = map['amazonAlexaData'];
|
||||
}
|
||||
}
|
||||
|
||||
Rx<AmazonAlexa> amazonAlexaData = AmazonAlexa().obs;
|
||||
}
|
||||
@ -38,7 +38,7 @@ class _GoogleHomePageState extends State<GoogleHomePage> {
|
||||
children: [
|
||||
_buildTopWidget(),
|
||||
SizedBox(height: 20.h),
|
||||
_buildBottomWidget(),
|
||||
Obx(_buildBottomWidget),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -48,10 +48,10 @@ class _GoogleHomePageState extends State<GoogleHomePage> {
|
||||
Widget _buildTopWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: 'Action name'.tr,
|
||||
rightTitle: 'ScienerSmart'.tr,
|
||||
),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: 'Action name'.tr,
|
||||
rightTitle: state.googleHomeData.value.actionName ?? '',
|
||||
)),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
@ -76,15 +76,22 @@ class _GoogleHomePageState extends State<GoogleHomePage> {
|
||||
}
|
||||
|
||||
Widget _buildBottomWidget() {
|
||||
final String instructions = '1.用智能锁APP添加锁和网关\n\n'
|
||||
'2.在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Google Home\n\n'
|
||||
'3.安装Google Home APP,点击左上角的“+”按钮\n\n'
|
||||
'4.在设置页面,选择“与Google协同工作”\n\n'
|
||||
'5.搜索“${state.googleHomeData.value.actionName ?? ''}”,并用智能锁APP的账号和密码进行授权';
|
||||
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
width: ScreenUtil().screenWidth,
|
||||
padding: _contentPadding,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildInfoSection('支持的语言'.tr, '英语'.tr),
|
||||
_buildInfoSection(
|
||||
'支持的语言'.tr, state.googleHomeData.value.langs?.join('、') ?? ''),
|
||||
SizedBox(height: 20.h),
|
||||
_buildInfoSection('操作流程'.tr, 'Google Home操作流程的值'.tr),
|
||||
_buildInfoSection('操作流程'.tr, instructions),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
||||
|
||||
class GoogleHomeState {
|
||||
GoogleHomeState() {
|
||||
@ -11,8 +12,12 @@ class GoogleHomeState {
|
||||
isOpenedText.value = '开启';
|
||||
}
|
||||
}
|
||||
if (map['googleHomeData'] != null) {
|
||||
googleHomeData.value = map['googleHomeData'];
|
||||
}
|
||||
}
|
||||
|
||||
RxBool isGoogleHome = false.obs;
|
||||
RxString isOpenedText = '开启'.obs;
|
||||
Rx<GoogleHome> googleHomeData = GoogleHome().obs;
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
||||
import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireElectronicKey/expireLockList_entity.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet/mineSet_state.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
||||
@ -66,6 +66,16 @@ class MineSetLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
//用户信息
|
||||
Future<void> getUserInfoRequest() async {
|
||||
final MinePersonInfoEntity entity = await ApiRepository.to.getUserInfo();
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
Storage.setBool(saveIsVip, entity.data!.isVip! == 1);
|
||||
state.amazonAlexaData.value = entity.data!.amazonAlexa ?? AmazonAlexa();
|
||||
state.googleHomeData.value = entity.data!.googleHome ?? GoogleHome();
|
||||
}
|
||||
}
|
||||
|
||||
//更新提示音
|
||||
Future<void> updatePrompToneRequest() async {
|
||||
final ExpireLockListEntity entity = await ApiRepository.to
|
||||
@ -170,6 +180,7 @@ class MineSetLogic extends BaseGetXController {
|
||||
|
||||
state.currentLanguage.value = _getCurrentLanguage();
|
||||
_initLoadDataAction();
|
||||
getUserInfoRequest();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -320,7 +320,7 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
Navigator.pushNamed(
|
||||
context, Routers.aPPUnlockNeedMobileNetworkingLockPage);
|
||||
}),
|
||||
if(!F.isSKY)
|
||||
if (!F.isSKY)
|
||||
CommonItem(
|
||||
leftTitel: '增值服务'.tr,
|
||||
isHaveLine: true,
|
||||
@ -340,7 +340,8 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.amazonAlexaPage, arguments: <String, dynamic>{
|
||||
'isAmazonAlexa': state.isAmazonAlexa.value
|
||||
'isAmazonAlexa': state.isAmazonAlexa.value,
|
||||
'amazonAlexaData': state.amazonAlexaData.value
|
||||
});
|
||||
}),
|
||||
CommonItem(
|
||||
@ -350,7 +351,8 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.googleHomePage, arguments: <String, dynamic>{
|
||||
'isGoogleHome': state.isGoogleHome.value
|
||||
'isGoogleHome': state.isGoogleHome.value,
|
||||
'googleHomeData': state.googleHomeData.value
|
||||
})?.then((Object? value) {
|
||||
logic.userSettingsInfoRequest();
|
||||
});
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
||||
|
||||
class MineSetState {
|
||||
@ -18,6 +19,8 @@ class MineSetState {
|
||||
var currentLanguage = "".obs; //隐藏无效开锁
|
||||
RxBool isAmazonAlexa = false.obs; //亚马逊Alexa
|
||||
RxBool isGoogleHome = false.obs; //谷歌Home
|
||||
Rx<AmazonAlexa> amazonAlexaData = AmazonAlexa().obs;
|
||||
Rx<GoogleHome> googleHomeData = GoogleHome().obs;
|
||||
|
||||
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
|
||||
FlutterLocalNotificationsPlugin();
|
||||
|
||||
@ -21,10 +21,12 @@ class ValueAddedServicesListLogic extends BaseGetXController {
|
||||
final MinePersonInfoEntity entity = await ApiRepository.to.getUserInfo();
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
Storage.setBool(saveIsVip, entity.data!.isVip! == 1);
|
||||
state.amazonAlexaData.value = entity.data!.amazonAlexa ?? AmazonAlexa();
|
||||
state.googleHomeData.value = entity.data!.googleHome ?? GoogleHome();
|
||||
}
|
||||
}
|
||||
|
||||
//用户信息
|
||||
//用户设置信息
|
||||
Future<void> userSettingsInfoRequest() async {
|
||||
final UserSettingInfoEntity entity =
|
||||
await ApiRepository.to.userSettingsInfo();
|
||||
|
||||
@ -117,7 +117,8 @@ class _ValueAddedServicesPageListState
|
||||
),
|
||||
'Amazon Alexa', () {
|
||||
Get.toNamed(Routers.amazonAlexaPage, arguments: <String, dynamic>{
|
||||
'isAmazonAlexa': state.isAmazonAlexa.value
|
||||
'isAmazonAlexa': state.isAmazonAlexa.value,
|
||||
'amazonAlexaData': state.amazonAlexaData.value
|
||||
});
|
||||
}),
|
||||
if (!F.isProductionEnv)
|
||||
@ -132,7 +133,8 @@ class _ValueAddedServicesPageListState
|
||||
'Google Home', () {
|
||||
// EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
Get.toNamed(Routers.googleHomePage, arguments: <String, dynamic>{
|
||||
'isGoogleHome': state.isGoogleHome.value
|
||||
'isGoogleHome': state.isGoogleHome.value,
|
||||
'googleHomeData': state.googleHomeData.value
|
||||
})?.then((Object? value) {
|
||||
logic.userSettingsInfoRequest();
|
||||
});
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
||||
|
||||
class ValueAddedServicesListState {
|
||||
RxBool isAmazonAlexa = false.obs; //亚马逊Alexa
|
||||
RxBool isGoogleHome = false.obs; //谷歌Home
|
||||
Rx<AmazonAlexa> amazonAlexaData = AmazonAlexa().obs;
|
||||
Rx<GoogleHome> googleHomeData = GoogleHome().obs;
|
||||
}
|
||||
|
||||