Merge branch 'master' of https://gitee.com/starlock-cn/app-starlock
This commit is contained in:
commit
06c41eb130
BIN
star_lock/images/icon_circle_dotted.png
Normal file
BIN
star_lock/images/icon_circle_dotted.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
BIN
star_lock/images/icon_lock_err.png
Normal file
BIN
star_lock/images/icon_lock_err.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
BIN
star_lock/images/icon_lock_fill.png
Normal file
BIN
star_lock/images/icon_lock_fill.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
File diff suppressed because it is too large
Load Diff
@ -806,5 +806,14 @@
|
|||||||
"已开通":"已开通",
|
"已开通":"已开通",
|
||||||
"该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用",
|
"该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用",
|
||||||
"常用程序":"常用程序",
|
"常用程序":"常用程序",
|
||||||
"该锁已被重置":"该锁已被重置"
|
"该锁已被重置":"该锁已被重置",
|
||||||
|
"需要访问读写权限才能使用手动升级固件":"需要访问读写权限才能使用手动升级固件",
|
||||||
|
"错误D固件,请选择正确的文件":"错误固件,请选择正确的文件",
|
||||||
|
"非SYD固件,请选择正确的文件":"非SYD固件,请选择正确的文件",
|
||||||
|
"文件校验失败 0x01":"文件校验失败 0x01",
|
||||||
|
"解析元数据失败,请选择正确的文件":"解析元数据失败,请选择正确的文件",
|
||||||
|
"文件校验失败 0x02":"文件校验失败 0x02",
|
||||||
|
"文件校验失败 0x03":"文件校验失败 0x03",
|
||||||
|
"固件升级完成":"固件升级完成",
|
||||||
|
"记录":"记录"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -809,5 +809,14 @@
|
|||||||
"已开通":"已开通",
|
"已开通":"已开通",
|
||||||
"该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用",
|
"该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用",
|
||||||
"常用程序":"常用程序",
|
"常用程序":"常用程序",
|
||||||
"该锁已被重置":"该锁已被重置"
|
"该锁已被重置":"该锁已被重置",
|
||||||
|
"记录":"记录",
|
||||||
|
"需要访问读写权限才能使用手动升级固件":"需要访问读写权限才能使用手动升级固件",
|
||||||
|
"错误D固件,请选择正确的文件":"错误固件,请选择正确的文件",
|
||||||
|
"非SYD固件,请选择正确的文件":"非SYD固件,请选择正确的文件",
|
||||||
|
"文件校验失败 0x01":"文件校验失败 0x01",
|
||||||
|
"解析元数据失败,请选择正确的文件":"解析元数据失败,请选择正确的文件",
|
||||||
|
"文件校验失败 0x02":"文件校验失败 0x02",
|
||||||
|
"文件校验失败 0x03":"文件校验失败 0x03",
|
||||||
|
"固件升级完成":"固件升级完成"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,6 +53,7 @@ import 'package:star_lock/mine/mineSet/transferSmartLock/recipientInformation/re
|
|||||||
import 'package:star_lock/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart';
|
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_page.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_page.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_page.dart';
|
||||||
|
|
||||||
import 'common/safetyVerification/safetyVerification_page.dart';
|
import 'common/safetyVerification/safetyVerification_page.dart';
|
||||||
@ -447,6 +448,8 @@ abstract class Routers {
|
|||||||
static const seletKeyCyclicDatePage =
|
static const seletKeyCyclicDatePage =
|
||||||
'/SeletKeyCyclicDatePage'; // 电子钥匙、授权管理员、卡、指纹、遥控等添加添加循环日期公共界面
|
'/SeletKeyCyclicDatePage'; // 电子钥匙、授权管理员、卡、指纹、遥控等添加添加循环日期公共界面
|
||||||
static const advancedFeaturesWebPage = '/advancedFeaturesWebPage'; // 高级功能
|
static const advancedFeaturesWebPage = '/advancedFeaturesWebPage'; // 高级功能
|
||||||
|
static const advancedFunctionRecordPage =
|
||||||
|
'/advancedFunctionRecordPage'; //高级功能购买记录
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppRouters {
|
abstract class AppRouters {
|
||||||
@ -1068,6 +1071,9 @@ abstract class AppRouters {
|
|||||||
GetPage(name: Routers.addPalmPage, page: (() => const AddPalmPage())),
|
GetPage(name: Routers.addPalmPage, page: (() => const AddPalmPage())),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.advancedFeaturesWebPage,
|
name: Routers.advancedFeaturesWebPage,
|
||||||
page: (() => AdvancedFeaturesWebPage()))
|
page: (() => AdvancedFeaturesWebPage())),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.advancedFunctionRecordPage,
|
||||||
|
page: (() => const AdvancedFunctionRecordPage())),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,7 +127,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
||||||
|
|
||||||
bool ifHaveKey = await Storage.ifHaveKey(saveBlueToken);
|
bool ifHaveKey = await Storage.ifHaveKey(saveBlueToken);
|
||||||
if(!ifHaveKey){
|
if (!ifHaveKey) {
|
||||||
var saveTokenList = changeIntListToStringList([0, 0, 0, 0]);
|
var saveTokenList = changeIntListToStringList([0, 0, 0, 0]);
|
||||||
Storage.setStringList(saveBlueToken, saveTokenList);
|
Storage.setStringList(saveBlueToken, saveTokenList);
|
||||||
}
|
}
|
||||||
@ -172,7 +172,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 15.h),
|
margin: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 15.h),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 20.h),
|
padding: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 30.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
@ -232,79 +232,78 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Obx(() {
|
GestureDetector(
|
||||||
return GestureDetector(
|
onTap: state.openDoorBtnisUneable.value == true
|
||||||
onTap: state.openDoorBtnisUneable.value == true
|
? () {
|
||||||
? () {
|
setState(() {
|
||||||
setState(() {
|
startOpenLock();
|
||||||
startOpenLock();
|
});
|
||||||
});
|
}
|
||||||
}
|
: null,
|
||||||
: null,
|
onLongPressStart: state.openDoorBtnisUneable.value == true
|
||||||
onLongPressStart: state.openDoorBtnisUneable.value == true
|
? (details) {
|
||||||
? (details) {
|
setState(() {
|
||||||
setState(() {
|
startUnLock();
|
||||||
startUnLock();
|
});
|
||||||
});
|
}
|
||||||
}
|
: null,
|
||||||
: null,
|
child: Container(
|
||||||
child: Container(
|
width: 100.r,
|
||||||
decoration: BoxDecoration(
|
height: 100.r,
|
||||||
color: Colors.white.withOpacity(0.9),
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(100.w),
|
color: Colors.white,
|
||||||
boxShadow: [
|
borderRadius: BorderRadius.circular(100.w),
|
||||||
BoxShadow(
|
boxShadow: [
|
||||||
color: Colors.black.withOpacity(0.3),
|
BoxShadow(
|
||||||
offset: Offset(0, 0),
|
color: Colors.black.withOpacity(0.3),
|
||||||
blurRadius: 10.r,
|
offset: Offset(0, 0),
|
||||||
spreadRadius: 0,
|
blurRadius: 10.r,
|
||||||
),
|
spreadRadius: 0,
|
||||||
]),
|
|
||||||
margin: EdgeInsets.only(left: 35.w, bottom: 15.h),
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
FlavorsImg(
|
|
||||||
child: Image.asset(
|
|
||||||
state.openDoorBtnisUneable.value == false
|
|
||||||
? 'images/main/icon_main_openLockBtn_grey.png'
|
|
||||||
: (state.isOpenPassageMode.value == 1
|
|
||||||
? 'images/main/icon_main_normallyOpenMode_center.png'
|
|
||||||
: 'images/main/icon_main_openLockBtn_center.png'),
|
|
||||||
width: 96.r,
|
|
||||||
height: 96.r,
|
|
||||||
// color: AppColors.primaryTopColor,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
state.openDoorBtnisUneable.value == false
|
]),
|
||||||
? Positioned(
|
margin: EdgeInsets.only(left: 35.w, bottom: 15.h),
|
||||||
child: FlavorsImg(
|
child: Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
state.openDoorBtnisUneable.value == false
|
||||||
|
? Icon(
|
||||||
|
Icons.bluetooth_searching,
|
||||||
|
size: 48.r,
|
||||||
|
color: AppColors.mainColor,
|
||||||
|
)
|
||||||
|
: Image.asset(
|
||||||
|
state.isOpenPassageMode.value == 1
|
||||||
|
? 'images/icon_lock_err.png'
|
||||||
|
: 'images/icon_lock_fill.png',
|
||||||
|
width: 38.r,
|
||||||
|
height: 38.r,
|
||||||
|
color: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
state.openDoorBtnisUneable.value == false
|
||||||
|
? Positioned(
|
||||||
|
child: Icon(
|
||||||
|
Icons.bluetooth_searching,
|
||||||
|
size: 96.r,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: state.openLockBtnState.value == 1
|
||||||
|
? xhjBuildRotationTransition(
|
||||||
|
width: 88.r,
|
||||||
|
height: 88.r,
|
||||||
|
)
|
||||||
|
: Positioned(
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'images/main/icon_main_openLockBtn_grey.png',
|
'images/icon_circle_dotted.png',
|
||||||
width: 96.r,
|
width: 88.r,
|
||||||
height: 96.r,
|
height: 88.r,
|
||||||
),
|
color: state.isOpenPassageMode.value == 1
|
||||||
),
|
? Colors.red
|
||||||
)
|
: AppColors.mainColor,
|
||||||
: state.openLockBtnState.value == 1
|
)),
|
||||||
? buildRotationTransition(
|
],
|
||||||
width: 96.r,
|
|
||||||
height: 96.r,
|
|
||||||
)
|
|
||||||
: Positioned(
|
|
||||||
child: FlavorsImg(
|
|
||||||
child: Image.asset(
|
|
||||||
state.isOpenPassageMode.value == 1
|
|
||||||
? 'images/main/icon_main_normallyOpenMode_circle.png'
|
|
||||||
: 'images/main/icon_main_openLockBtn_circle.png',
|
|
||||||
width: 96.r,
|
|
||||||
height: 96.r,
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
}),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
|
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -735,6 +734,28 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//旋转动画
|
||||||
|
Widget xhjBuildRotationTransition(
|
||||||
|
{required double width, required double height}) {
|
||||||
|
return Positioned(
|
||||||
|
child: RotationTransition(
|
||||||
|
//设置动画的旋转中心
|
||||||
|
alignment: Alignment.center,
|
||||||
|
//动画控制器
|
||||||
|
turns: state.animationController!,
|
||||||
|
//将要执行动画的子view
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_circle_dotted.png',
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
color: state.isOpenPassageMode.value == 1
|
||||||
|
? Colors.red
|
||||||
|
: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//旋转动画
|
//旋转动画
|
||||||
Widget buildRotationTransition(
|
Widget buildRotationTransition(
|
||||||
{required double width, required double height}) {
|
{required double width, required double height}) {
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class LockEscalationLogic extends BaseGetXController {
|
|||||||
//手动升级
|
//手动升级
|
||||||
Future<void> otaUpdate() async {
|
Future<void> otaUpdate() async {
|
||||||
var status = await PermissionDialog.request(
|
var status = await PermissionDialog.request(
|
||||||
Permission.storage, '需要访问读写权限才能使用手动升级固件');
|
Permission.storage, '需要访问读写权限才能使用手动升级固件'.tr);
|
||||||
if (status != true) {
|
if (status != true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -161,24 +161,52 @@ class LockEscalationLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 检查文件头
|
// 检查文件头
|
||||||
Future<Map?> getHeadFile(Uint8List data) async {
|
Future<Map?> getHeadFile(Uint8List data) async {
|
||||||
|
if (data.length <= 16) {
|
||||||
|
showToast('错误固件,请选择正确的文件'.tr);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
// 检查文件头
|
// 检查文件头
|
||||||
String header = utf8.decode(data.sublist(0, 12));
|
String header;
|
||||||
|
try {
|
||||||
|
header = utf8.decode(data.sublist(0, 12));
|
||||||
|
} catch (e) {
|
||||||
|
showToast('非SYD固件,请选择正确的文件'.tr);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (header != 'SYD-BIN-DATA') {
|
if (header != 'SYD-BIN-DATA') {
|
||||||
showToast('非SYD固件,请选择正确的文件');
|
showToast('非SYD固件,请选择正确的文件'.tr);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// 解析元数据长度
|
// 解析元数据长度
|
||||||
Uint8List metaLenList = data.sublist(12, 16);
|
Uint8List metaLenList;
|
||||||
int metaLen = ByteData.sublistView(metaLenList).getUint32(0);
|
int metaLen;
|
||||||
|
try {
|
||||||
|
metaLenList = data.sublist(12, 16);
|
||||||
|
metaLen = ByteData.sublistView(metaLenList).getUint32(0);
|
||||||
|
} catch (e) {
|
||||||
|
showToast('文件校验失败 0x01'.tr);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (metaLen < 2 || metaLen > 10240) {
|
if (metaLen < 2 || metaLen > 10240) {
|
||||||
showToast('文件校验失败 0x01');
|
showToast('文件校验失败 0x01'.tr);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// 读取和解析元数据
|
// 读取和解析元数据
|
||||||
Uint8List metaStrList = data.sublist(16, 16 + metaLen);
|
Uint8List metaStrList;
|
||||||
String metaStr = utf8.decode(metaStrList);
|
String metaStr;
|
||||||
|
try {
|
||||||
|
metaStrList = data.sublist(16, 16 + metaLen);
|
||||||
|
metaStr = utf8.decode(metaStrList);
|
||||||
|
} catch (e) {
|
||||||
|
showToast('解析元数据失败,请选择正确的文件'.tr);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
AppLog.log(metaStr);
|
AppLog.log(metaStr);
|
||||||
var meta = jsonDecode(metaStr);
|
var meta = jsonDecode(metaStr);
|
||||||
|
if (meta is! Map) {
|
||||||
|
showToast('解析元数据失败,请选择正确的文件'.tr);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return meta..['metaLen'] = metaLen;
|
return meta..['metaLen'] = metaLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,11 +219,11 @@ class LockEscalationLogic extends BaseGetXController {
|
|||||||
String md5Str = md5.convert(bin).toString().toUpperCase();
|
String md5Str = md5.convert(bin).toString().toUpperCase();
|
||||||
AppLog.log('---> $md5Str ${meta['fwMd5']}');
|
AppLog.log('---> $md5Str ${meta['fwMd5']}');
|
||||||
if (md5Str != meta['fwMd5']) {
|
if (md5Str != meta['fwMd5']) {
|
||||||
showToast('文件校验失败 0x02');
|
showToast('文件校验失败 0x02'.tr);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (bin.length != meta['fwSize']) {
|
if (bin.length != meta['fwSize']) {
|
||||||
showToast('文件校验失败 0x03');
|
showToast('文件校验失败 0x03'.tr);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return bin;
|
return bin;
|
||||||
@ -225,7 +253,7 @@ class LockEscalationLogic extends BaseGetXController {
|
|||||||
processOtaUpgrade();
|
processOtaUpgrade();
|
||||||
} else if (reply is ConfirmationOTAUpgradeReply && reply.status == 0x00) {
|
} else if (reply is ConfirmationOTAUpgradeReply && reply.status == 0x00) {
|
||||||
closeOTADAta();
|
closeOTADAta();
|
||||||
showToast('固件升级完成');
|
showToast('固件升级完成'.tr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -152,6 +152,10 @@ class _MsgNotificationPageState extends State<MsgNotificationPage> {
|
|||||||
SizedBox(width: 60.w, height: 50.h, child: _switch(4)))),
|
SizedBox(width: 60.w, height: 50.h, child: _switch(4)))),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 60.h,
|
height: 60.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'此模块功能需要锁联网后设置方可生效',
|
||||||
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@ -163,6 +163,11 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
return returnWidget;
|
return returnWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//鑫泓佳背景
|
||||||
|
Widget XHJBg({required Widget child}) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
|
||||||
Widget unHaveData() {
|
Widget unHaveData() {
|
||||||
return ListView(
|
return ListView(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -86,7 +86,8 @@ class _StarLockMainXHJPageState extends State<StarLockMainXHJPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
bottomNavigationBar: Container(
|
bottomNavigationBar: Container(
|
||||||
padding: EdgeInsets.only(top: 20.h),
|
padding: EdgeInsets.only(
|
||||||
|
top: 20.h, bottom: GetPlatform.isAndroid ? 20.h : 0),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
border: Border(
|
border: Border(
|
||||||
|
|||||||
@ -49,155 +49,196 @@ class _AboutPageState extends State<AboutPage> {
|
|||||||
builder: (AboutConsole logic) {
|
builder: (AboutConsole logic) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
|
defaultCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.about!.tr,
|
barTitle: TranslationLoader.lanKeys!.about!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.about!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
F.sw(
|
||||||
alignment: Alignment.topRight,
|
defaultCall: () => logoView(),
|
||||||
child: GestureDetector(
|
xhjCall: () => const SizedBox()),
|
||||||
onTap: logic.handleTap,
|
listView(),
|
||||||
child: Container(
|
F.sw(
|
||||||
color: Colors.transparent,
|
defaultCall: () => const SizedBox(),
|
||||||
width: 80.w,
|
xhjCall: () => logoView()),
|
||||||
height: 80.h,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 70.h),
|
|
||||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
|
||||||
Image.asset(
|
|
||||||
F.sw(
|
|
||||||
defaultCall: () => "images/icon_main_1024.png",
|
|
||||||
xhjCall: () => "images/icon_main_xhj_1024.png"),
|
|
||||||
width: 160.w,
|
|
||||||
height: 160.w),
|
|
||||||
]),
|
|
||||||
SizedBox(height: 20.h),
|
|
||||||
Text(
|
|
||||||
"${F.title} $version+$buildNumber",
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
|
|
||||||
),
|
|
||||||
SizedBox(height: 20.h),
|
|
||||||
Text(
|
|
||||||
F.apiPrefix,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 60.h,
|
|
||||||
),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader.lanKeys!.introduce!.tr,
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: false,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
|
||||||
arguments: {
|
|
||||||
"url": XSConstantMacro.introduceURL,
|
|
||||||
"title": '介绍'.tr
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
Divider(
|
|
||||||
height: 1,
|
|
||||||
color: AppColors.greyLineColor,
|
|
||||||
indent: 20.w,
|
|
||||||
endIndent: 20.w,
|
|
||||||
),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader.lanKeys!.userAgreement!.tr,
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: false,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Get.toNamed(Routers.webviewShowPage, arguments: {
|
|
||||||
"url": XSConstantMacro.userAgreementURL,
|
|
||||||
"title": '用户协议'.tr
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
Divider(
|
|
||||||
height: 1,
|
|
||||||
color: AppColors.greyLineColor,
|
|
||||||
indent: 20.w,
|
|
||||||
endIndent: 20.w,
|
|
||||||
),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader.lanKeys!.privacyPolicy!.tr,
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: false,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
|
||||||
arguments: {
|
|
||||||
"url": XSConstantMacro.privacyPolicyURL,
|
|
||||||
"title": '隐私政策'.tr
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
Divider(
|
|
||||||
height: 1,
|
|
||||||
color: AppColors.greyLineColor,
|
|
||||||
indent: 20.w,
|
|
||||||
endIndent: 20.w,
|
|
||||||
),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader
|
|
||||||
.lanKeys!.personalInformationCollectionList!.tr,
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: false,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
|
||||||
arguments: {
|
|
||||||
"url": XSConstantMacro.collectionListURL,
|
|
||||||
"title": '个人信息收集清单'.tr
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
Divider(
|
|
||||||
height: 1,
|
|
||||||
color: AppColors.greyLineColor,
|
|
||||||
indent: 20.w,
|
|
||||||
endIndent: 20.w,
|
|
||||||
),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader
|
|
||||||
.lanKeys!.applicationPermissionDescription!.tr,
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: false,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
|
||||||
arguments: {
|
|
||||||
"url": XSConstantMacro.appPermissionDescURL,
|
|
||||||
"title": '应用权限说明'.tr
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
Divider(
|
|
||||||
height: 1,
|
|
||||||
color: AppColors.greyLineColor,
|
|
||||||
indent: 20.w,
|
|
||||||
endIndent: 20.w,
|
|
||||||
),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader
|
|
||||||
.lanKeys!.thirdPartyInformationSharingList!.tr,
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: false,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
|
||||||
arguments: {
|
|
||||||
"url": XSConstantMacro.thirdPartyInfShareListURL,
|
|
||||||
"title": '第三方信息共享清单'.tr
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//列表
|
||||||
|
Widget listView() {
|
||||||
|
Widget view = Column(
|
||||||
|
children: [
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: TranslationLoader.lanKeys!.introduce!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: false,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
|
||||||
|
"url": XSConstantMacro.introduceURL,
|
||||||
|
"title": '介绍'.tr
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: TranslationLoader.lanKeys!.userAgreement!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: false,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Get.toNamed(Routers.webviewShowPage, arguments: {
|
||||||
|
"url": XSConstantMacro.userAgreementURL,
|
||||||
|
"title": '用户协议'.tr
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: TranslationLoader.lanKeys!.privacyPolicy!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: false,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
|
||||||
|
"url": XSConstantMacro.privacyPolicyURL,
|
||||||
|
"title": '隐私政策'.tr
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: TranslationLoader
|
||||||
|
.lanKeys!.personalInformationCollectionList!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: false,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
|
||||||
|
"url": XSConstantMacro.collectionListURL,
|
||||||
|
"title": '个人信息收集清单'.tr
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.applicationPermissionDescription!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: false,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
|
||||||
|
"url": XSConstantMacro.appPermissionDescURL,
|
||||||
|
"title": '应用权限说明'.tr
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.thirdPartyInformationSharingList!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: false,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
|
||||||
|
"url": XSConstantMacro.thirdPartyInfShareListURL,
|
||||||
|
"title": '第三方信息共享清单'.tr
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
view = F.sw(
|
||||||
|
defaultCall: () => view,
|
||||||
|
xhjCall: () => Container(
|
||||||
|
margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: view,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
//图标
|
||||||
|
Widget logoView() {
|
||||||
|
return GetBuilder<AboutConsole>(builder: (AboutConsole logic) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(top: 70.h, bottom: 60.h),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.topRight,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: logic.handleTap,
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 80.w,
|
||||||
|
height: 80.h,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: Image.asset(
|
||||||
|
F.sw(
|
||||||
|
defaultCall: () => "images/icon_main_1024.png",
|
||||||
|
xhjCall: () => "images/icon_main_xhj_1024.png"),
|
||||||
|
width: 160.w,
|
||||||
|
height: 160.w),
|
||||||
|
),
|
||||||
|
SizedBox(height: 20.h),
|
||||||
|
Text(
|
||||||
|
"${F.title} $version+$buildNumber",
|
||||||
|
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
|
||||||
|
),
|
||||||
|
SizedBox(height: 20.h),
|
||||||
|
Text(
|
||||||
|
F.apiPrefix,
|
||||||
|
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/mine/addLock/addLock/addLock_logic.dart';
|
import 'package:star_lock/mine/addLock/addLock/addLock_logic.dart';
|
||||||
import 'package:star_lock/tools/appFirstEnterHandle.dart';
|
import 'package:star_lock/tools/appFirstEnterHandle.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
@ -30,10 +31,20 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
|||||||
builder: (AddLockLogic logic) {
|
builder: (AddLockLogic logic) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
|
defaultCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
import '../../../blue/blue_manage.dart';
|
import '../../../blue/blue_manage.dart';
|
||||||
import '../../../tools/appRouteObserver.dart';
|
import '../../../tools/appRouteObserver.dart';
|
||||||
@ -27,30 +27,48 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
|||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
|
defaultCall: () => TitleAppBar(
|
||||||
haveBack: true,
|
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
|
||||||
backgroundColor: AppColors.mainColor,
|
haveBack: true,
|
||||||
actionsList: [
|
backgroundColor: AppColors.mainColor,
|
||||||
CupertinoActivityIndicator(radius: 18.w, color: Colors.white,),
|
actionsList: [
|
||||||
SizedBox(width: 30.w)
|
CupertinoActivityIndicator(
|
||||||
],
|
radius: 18.w,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
SizedBox(width: 30.w)
|
||||||
|
]),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
actionsList: [
|
||||||
|
CupertinoActivityIndicator(
|
||||||
|
radius: 18.w,
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
SizedBox(width: 30.w)
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
body: Obx(() {
|
body: Obx(() {
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
itemCount: state.devices.length,
|
itemCount: state.devices.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return nearbyLockItem('images/icon_lockGroup_item.png', state.devices[index], () {
|
return nearbyLockItem(
|
||||||
|
'images/icon_lockGroup_item.png', state.devices[index], () {
|
||||||
// Navigator.pushNamed(context, Routers.lockAddressPage);
|
// Navigator.pushNamed(context, Routers.lockAddressPage);
|
||||||
// logic.getPublicKey(state.devices[index].serviceUuids[0].toString());
|
// logic.getPublicKey(state.devices[index].serviceUuids[0].toString());
|
||||||
state.selectLockName.value = state.devices[index].advertisementData.advName;
|
state.selectLockName.value =
|
||||||
|
state.devices[index].advertisementData.advName;
|
||||||
logic.connect(state.devices[index].advertisementData.advName);
|
logic.connect(state.devices[index].advertisementData.advName);
|
||||||
// Get.toNamed(Routers.lockAddressGaoDePage);
|
// Get.toNamed(Routers.lockAddressGaoDePage);
|
||||||
});
|
});
|
||||||
@ -68,9 +86,16 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget nearbyLockItem(String lockTypeIcon, ScanResult scanResult, Function() action ) {
|
Widget nearbyLockItem(
|
||||||
|
String lockTypeIcon, ScanResult scanResult, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: ((scanResult.advertisementData.serviceUuids.isNotEmpty ? scanResult.advertisementData.serviceUuids[0] : "").toString()[33] == "1") ? action : null,
|
onTap: ((scanResult.advertisementData.serviceUuids.isNotEmpty
|
||||||
|
? scanResult.advertisementData.serviceUuids[0]
|
||||||
|
: "")
|
||||||
|
.toString()[33] ==
|
||||||
|
"1")
|
||||||
|
? action
|
||||||
|
: null,
|
||||||
child: Column(
|
child: Column(
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -92,7 +117,18 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// 第32、33两位00 表示休眠, 01表示唤醒
|
// 第32、33两位00 表示休眠, 01表示唤醒
|
||||||
Text(scanResult.advertisementData.advName, style: TextStyle(fontSize: 20.sp, color: ((scanResult.advertisementData.serviceUuids.isNotEmpty ? scanResult.advertisementData.serviceUuids[0] : "").toString()[33] == "1") ? AppColors.blackColor : Colors.grey)),
|
Text(scanResult.advertisementData.advName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp,
|
||||||
|
color: ((scanResult.advertisementData.serviceUuids
|
||||||
|
.isNotEmpty
|
||||||
|
? scanResult.advertisementData
|
||||||
|
.serviceUuids[0]
|
||||||
|
: "")
|
||||||
|
.toString()[33] ==
|
||||||
|
"1")
|
||||||
|
? AppColors.blackColor
|
||||||
|
: Colors.grey)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -173,5 +209,4 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
|||||||
logic.stopScanBlueList();
|
logic.stopScanBlueList();
|
||||||
BlueManage().disconnect();
|
BlueManage().disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -18,7 +17,8 @@ class SelectLockTypePage extends StatefulWidget {
|
|||||||
State<SelectLockTypePage> createState() => _SelectLockTypePageState();
|
State<SelectLockTypePage> createState() => _SelectLockTypePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget {
|
class _SelectLockTypePageState extends State<SelectLockTypePage>
|
||||||
|
with BaseWidget {
|
||||||
final logic = Get.put(SelectLockTypeLogic());
|
final logic = Get.put(SelectLockTypeLogic());
|
||||||
final state = Get.find<SelectLockTypeLogic>().state;
|
final state = Get.find<SelectLockTypeLogic>().state;
|
||||||
|
|
||||||
@ -26,121 +26,165 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
|
defaultCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
|
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
allLock(),
|
allLock(),
|
||||||
Expanded(
|
lockTypeList(),
|
||||||
child: Container(
|
|
||||||
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
|
||||||
child: GridView.count(
|
|
||||||
crossAxisCount: 2,
|
|
||||||
childAspectRatio: 2.83,
|
|
||||||
crossAxisSpacing: 10,
|
|
||||||
mainAxisSpacing: 10,
|
|
||||||
children: [
|
|
||||||
lockTypeItem('images/lockType/lockType_doorLock.png',
|
|
||||||
TranslationLoader.lanKeys!.doorLock!.tr, () {
|
|
||||||
Navigator.pushNamed(context, Routers.addLockPage,
|
|
||||||
arguments: {'getLockType': 1});
|
|
||||||
}),
|
|
||||||
if (!F.isLite)
|
|
||||||
lockTypeItem('images/lockType/lockType_NFCLock.png',
|
|
||||||
TranslationLoader.lanKeys!.NFCPassiveLock!.tr, () {
|
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
|
||||||
}),
|
|
||||||
if (!F.isLite)
|
|
||||||
lockTypeItem('images/lockType/lockType_padlock.png',
|
|
||||||
TranslationLoader.lanKeys!.padlock!.tr, () {
|
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
|
||||||
}),
|
|
||||||
lockTypeItem('images/lockType/lockType_safeLock.png',
|
|
||||||
TranslationLoader.lanKeys!.safeLock!.tr, () {
|
|
||||||
Navigator.pushNamed(context, Routers.addLockPage,
|
|
||||||
arguments: {'getLockType': 4});
|
|
||||||
}),
|
|
||||||
lockTypeItem('images/lockType/lockType_parkingLock.png',
|
|
||||||
TranslationLoader.lanKeys!.parkingLock!.tr, () {
|
|
||||||
Navigator.pushNamed(context, Routers.addLockPage,
|
|
||||||
arguments: {'getLockType': 5});
|
|
||||||
}),
|
|
||||||
lockTypeItem('images/lockType/lockType_entranceGuardLock.png',
|
|
||||||
TranslationLoader.lanKeys!.itelligentAccessControl!.tr,
|
|
||||||
() {
|
|
||||||
Navigator.pushNamed(context, Routers.addLockPage,
|
|
||||||
arguments: {'getLockType': 6});
|
|
||||||
}),
|
|
||||||
|
|
||||||
// lockTypeItem('images/lockType/lockType_bicycleLock.png',
|
|
||||||
// TranslationLoader.lanKeys!.bicycleLock!.tr, () {
|
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
|
||||||
// }),
|
|
||||||
if (!F.isLite)
|
|
||||||
lockTypeItem('images/lockType/lockType_gatewayLock.png',
|
|
||||||
TranslationLoader.lanKeys!.gateway!.tr, () {
|
|
||||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
|
||||||
}),
|
|
||||||
if (!F.isLite)
|
|
||||||
lockTypeItem('images/lockType/lockType_camera.png', '网络摄像头'.tr,
|
|
||||||
() {
|
|
||||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//锁列表控件
|
||||||
|
Widget lockTypeList() {
|
||||||
|
Widget view = F.sw(
|
||||||
|
defaultCall: () => GridView.count(
|
||||||
|
crossAxisCount: 2,
|
||||||
|
childAspectRatio: 2.83,
|
||||||
|
crossAxisSpacing: 10,
|
||||||
|
mainAxisSpacing: 10,
|
||||||
|
children: getLockTypeList(),
|
||||||
|
),
|
||||||
|
xhjCall: () => GridView.count(
|
||||||
|
crossAxisCount: 1,
|
||||||
|
childAspectRatio: 6,
|
||||||
|
crossAxisSpacing: 10,
|
||||||
|
mainAxisSpacing: 10,
|
||||||
|
children: getLockTypeList(),
|
||||||
|
));
|
||||||
|
return Expanded(
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
||||||
|
child: view,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//所有的锁类型匹配
|
||||||
|
List<Widget> getLockTypeList() {
|
||||||
|
return [
|
||||||
|
lockTypeItem('images/lockType/lockType_doorLock.png',
|
||||||
|
TranslationLoader.lanKeys!.doorLock!.tr, () {
|
||||||
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
|
arguments: {'getLockType': 1});
|
||||||
|
}),
|
||||||
|
if (!F.isLite)
|
||||||
|
lockTypeItem('images/lockType/lockType_NFCLock.png',
|
||||||
|
TranslationLoader.lanKeys!.NFCPassiveLock!.tr, () {
|
||||||
|
// Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
|
}),
|
||||||
|
if (!F.isLite)
|
||||||
|
lockTypeItem('images/lockType/lockType_padlock.png',
|
||||||
|
TranslationLoader.lanKeys!.padlock!.tr, () {
|
||||||
|
// Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
|
}),
|
||||||
|
lockTypeItem('images/lockType/lockType_safeLock.png',
|
||||||
|
TranslationLoader.lanKeys!.safeLock!.tr, () {
|
||||||
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
|
arguments: {'getLockType': 4});
|
||||||
|
}),
|
||||||
|
lockTypeItem('images/lockType/lockType_parkingLock.png',
|
||||||
|
TranslationLoader.lanKeys!.parkingLock!.tr, () {
|
||||||
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
|
arguments: {'getLockType': 5});
|
||||||
|
}),
|
||||||
|
lockTypeItem('images/lockType/lockType_entranceGuardLock.png',
|
||||||
|
TranslationLoader.lanKeys!.itelligentAccessControl!.tr, () {
|
||||||
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
|
arguments: {'getLockType': 6});
|
||||||
|
}),
|
||||||
|
|
||||||
|
// lockTypeItem('images/lockType/lockType_bicycleLock.png',
|
||||||
|
// TranslationLoader.lanKeys!.bicycleLock!.tr, () {
|
||||||
|
// Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
|
// }),
|
||||||
|
if (!F.isLite)
|
||||||
|
lockTypeItem('images/lockType/lockType_gatewayLock.png',
|
||||||
|
TranslationLoader.lanKeys!.gateway!.tr, () {
|
||||||
|
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||||
|
}),
|
||||||
|
if (!F.isLite)
|
||||||
|
lockTypeItem('images/lockType/lockType_camera.png', '网络摄像头'.tr, () {
|
||||||
|
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
//搜索全部的按钮
|
||||||
Widget allLock() {
|
Widget allLock() {
|
||||||
|
Widget view = Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(width: 30.w),
|
||||||
|
Image.asset(
|
||||||
|
'images/lockType/lockType_allLocks.png',
|
||||||
|
width: 88.w,
|
||||||
|
height: 80.w,
|
||||||
|
),
|
||||||
|
SizedBox(width: 40.w),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(TranslationLoader.lanKeys!.allLock!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
)),
|
||||||
|
Text(TranslationLoader.lanKeys!.searchAllLockType!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp, color: AppColors.darkGrayTextColor)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 40.w),
|
||||||
|
Image.asset(
|
||||||
|
'images/icon_right_grey.png',
|
||||||
|
width: 12.w,
|
||||||
|
height: 21.w,
|
||||||
|
),
|
||||||
|
SizedBox(width: 40.w),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
//风格区分
|
||||||
|
view = F.sw(
|
||||||
|
defaultCall: () => Container(
|
||||||
|
height: 150.h,
|
||||||
|
color: Colors.white,
|
||||||
|
margin: const EdgeInsets.all(10),
|
||||||
|
child: view,
|
||||||
|
),
|
||||||
|
xhjCall: () => Container(
|
||||||
|
height: 150.h,
|
||||||
|
margin: const EdgeInsets.all(10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
border: Border.all(color: AppColors.mainColor, width: 1),
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
),
|
||||||
|
child: view,
|
||||||
|
));
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage,
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
arguments: {'getLockType': 0});
|
arguments: {'getLockType': 0});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: view,
|
||||||
height: 150.h,
|
|
||||||
color: Colors.white,
|
|
||||||
margin: const EdgeInsets.all(10),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
SizedBox(width: 30.w),
|
|
||||||
Image.asset(
|
|
||||||
'images/lockType/lockType_allLocks.png',
|
|
||||||
width: 88.w,
|
|
||||||
height: 80.w,
|
|
||||||
),
|
|
||||||
SizedBox(width: 40.w),
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(TranslationLoader.lanKeys!.allLock!.tr,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 24.sp,
|
|
||||||
)),
|
|
||||||
Text(TranslationLoader.lanKeys!.searchAllLockType!.tr,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 20.sp, color: AppColors.darkGrayTextColor)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 40.w),
|
|
||||||
Image.asset(
|
|
||||||
'images/icon_right_grey.png',
|
|
||||||
width: 12.w,
|
|
||||||
height: 21.w,
|
|
||||||
),
|
|
||||||
SizedBox(width: 40.w),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,8 +194,14 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
|||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 120.h,
|
height: 120.h,
|
||||||
color: Colors.white,
|
decoration: F.sw(
|
||||||
// margin: EdgeInsets.all(10),
|
defaultCall: () => const BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
xhjCall: () => BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
)),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w),
|
SizedBox(width: 30.w),
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
|
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
import '../../../tools/dateTool.dart';
|
import '../../../tools/dateTool.dart';
|
||||||
@ -22,28 +22,55 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
barTitle: "消息详情".tr,
|
defaultCall: () => TitleAppBar(
|
||||||
haveBack: true,
|
barTitle: "消息详情".tr,
|
||||||
backgroundColor: AppColors.mainColor),
|
haveBack: true,
|
||||||
body: Container(
|
backgroundColor: AppColors.mainColor,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
|
),
|
||||||
child: Obx(() => Column(
|
xhjCall: () => TitleAppBar(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
barTitle: "消息详情".tr,
|
||||||
children: [
|
haveBack: true,
|
||||||
Text(
|
backgroundColor: Colors.white,
|
||||||
"${"创建时间".tr}:${DateTool().dateToYMDHNString(state.itemData.value.createdAt!.toString())}",
|
iconColor: AppColors.blackColor,
|
||||||
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
|
titleColor: AppColors.blackColor,
|
||||||
),
|
),
|
||||||
SizedBox(height: 20.h),
|
),
|
||||||
Text(
|
body: Container(
|
||||||
state.itemData.value.data!,
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
|
||||||
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
|
child: Obx(() => Column(
|
||||||
),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
],
|
children: [
|
||||||
)),
|
Text(
|
||||||
)
|
"${"创建时间".tr}:${DateTool().dateToYMDHNString(state.itemData.value.createdAt!.toString())}",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp, color: AppColors.placeholderTextColor),
|
||||||
|
),
|
||||||
|
SizedBox(height: 20.h),
|
||||||
|
textView(),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget textView() {
|
||||||
|
Widget view = Text(
|
||||||
|
state.itemData.value.data!,
|
||||||
|
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
|
||||||
);
|
);
|
||||||
|
return F.sw(
|
||||||
|
defaultCall: () => view,
|
||||||
|
xhjCall: () => Container(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 20.h, bottom: 20.h, left: 20.w, right: 20.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: view,
|
||||||
|
),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,6 +72,9 @@ class _MessageListXHJPageState extends State<MessageListXHJPage>
|
|||||||
: null,
|
: null,
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 15.h,
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 1.sw,
|
width: 1.sw,
|
||||||
height: 0.2.sw,
|
height: 0.2.sw,
|
||||||
|
|||||||
@ -77,10 +77,11 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
|||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(52.5.w),
|
borderRadius: BorderRadius.circular(52.5.w),
|
||||||
child: CustomNetworkImage(
|
child: CustomNetworkImage(
|
||||||
url: state.userHeadUrl.value ?? "",
|
url: state.userHeadUrl.value ?? "",
|
||||||
defaultUrl: 'images/controls_user.png',
|
defaultUrl: 'images/controls_user.png',
|
||||||
width: 105.w,
|
width: 105.w,
|
||||||
height: 105.h),
|
height: 105.h,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_logic.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_logic.dart';
|
||||||
import 'package:star_lock/tools/tf_input_haveBorder.dart';
|
import 'package:star_lock/tools/tf_input_haveBorder.dart';
|
||||||
|
|
||||||
@ -26,10 +27,20 @@ class _MineUnbindPhoneOrEmailState extends State<MineUnbindPhoneOrEmailPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
|
defaultCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
|
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_logic.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_logic.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
@ -25,10 +26,20 @@ class _MinePersonInfoEditAccountNextPageState
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
|
defaultCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
|
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart';
|
||||||
|
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
@ -25,45 +26,89 @@ class _MinePersonInfoEditNamePageState
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: AppColors.greyBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
|
defaultCall: () => TitleAppBar(
|
||||||
haveBack: true,
|
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
|
||||||
backgroundColor: AppColors.mainColor,
|
haveBack: true,
|
||||||
actionsList: [
|
backgroundColor: AppColors.mainColor,
|
||||||
TextButton(
|
actionsList: [
|
||||||
child: Text(
|
TextButton(
|
||||||
TranslationLoader.lanKeys!.save!.tr,
|
child: Text(
|
||||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
TranslationLoader.lanKeys!.save!.tr,
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
if (state.nickNameIsOK == false) {
|
||||||
|
logic.showToast("请输入昵称");
|
||||||
|
} else {
|
||||||
|
logic.updateUserInfoRequest();
|
||||||
|
}
|
||||||
|
},
|
||||||
),
|
),
|
||||||
onPressed: () {
|
],
|
||||||
if (state.nickNameIsOK == false) {
|
),
|
||||||
logic.showToast("请输入昵称");
|
xhjCall: () => TitleAppBar(
|
||||||
} else {
|
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
|
||||||
logic.updateUserInfoRequest();
|
haveBack: true,
|
||||||
}
|
backgroundColor: Colors.white,
|
||||||
},
|
iconColor: AppColors.blackColor,
|
||||||
),
|
titleColor: AppColors.blackColor,
|
||||||
],
|
actionsList: [
|
||||||
|
TextButton(
|
||||||
|
child: Text(
|
||||||
|
TranslationLoader.lanKeys!.save!.tr,
|
||||||
|
style:
|
||||||
|
TextStyle(color: AppColors.blackColor, fontSize: 24.sp),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
if (state.nickNameIsOK == false) {
|
||||||
|
logic.showToast("请输入昵称");
|
||||||
|
} else {
|
||||||
|
logic.updateUserInfoRequest();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
padding: EdgeInsets.all(15.w),
|
padding: EdgeInsets.all(15.w),
|
||||||
child: Column(
|
child: listView(),
|
||||||
children: [
|
|
||||||
LoginInput(
|
|
||||||
controller: state.nickNameController,
|
|
||||||
onchangeAction: (textStr) {
|
|
||||||
logic.checkNext(state.nickNameController);
|
|
||||||
},
|
|
||||||
isPwd: false,
|
|
||||||
leftWidget: SizedBox(width: 15.w),
|
|
||||||
hintText:
|
|
||||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.nickName!.tr}",
|
|
||||||
inputFormatters: [
|
|
||||||
LengthLimitingTextInputFormatter(20),
|
|
||||||
]),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget listView() {
|
||||||
|
Widget view = Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
LoginInput(
|
||||||
|
controller: state.nickNameController,
|
||||||
|
onchangeAction: (textStr) {
|
||||||
|
logic.checkNext(state.nickNameController);
|
||||||
|
},
|
||||||
|
isPwd: false,
|
||||||
|
leftWidget: SizedBox(width: 15.w),
|
||||||
|
hintText:
|
||||||
|
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.nickName!.tr}",
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(20),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
view = F.sw(
|
||||||
|
defaultCall: () => view,
|
||||||
|
xhjCall: () => Container(
|
||||||
|
margin: EdgeInsets.only(top: 20.h, left: 16.w, right: 16.w),
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: view,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
return view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
@ -28,12 +29,24 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
|
defaultCall: () => TitleAppBar(
|
||||||
barTitle: state.channel.value == "1"
|
barTitle: state.channel.value == "1"
|
||||||
? TranslationLoader.lanKeys!.mobileNumber!.tr
|
? TranslationLoader.lanKeys!.mobileNumber!.tr
|
||||||
: TranslationLoader.lanKeys!.email!.tr,
|
: TranslationLoader.lanKeys!.email!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: state.channel.value == "1"
|
||||||
|
? TranslationLoader.lanKeys!.mobileNumber!.tr
|
||||||
|
: TranslationLoader.lanKeys!.email!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
|
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
|
||||||
@ -58,11 +71,12 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
|||||||
rightWidget: Text(
|
rightWidget: Text(
|
||||||
'${state.countryName.value} +${state.countryCode.value}',
|
'${state.countryName.value} +${state.countryCode.value}',
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||||
),
|
),
|
||||||
action: () async {
|
action: () async {
|
||||||
var result = await Get.toNamed(Routers.selectCountryRegionPage);
|
var result =
|
||||||
|
await Get.toNamed(Routers.selectCountryRegionPage);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
result as Map<String, dynamic>;
|
result as Map<String, dynamic>;
|
||||||
state.countryCode.value = result['code'];
|
state.countryCode.value = result['code'];
|
||||||
@ -105,7 +119,8 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
|||||||
),
|
),
|
||||||
Obx(() => GestureDetector(
|
Obx(() => GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (state.accountIsOK.value && state.canResend.value) {
|
if (state.accountIsOK.value &&
|
||||||
|
state.canResend.value) {
|
||||||
logic.sendValidationCode();
|
logic.sendValidationCode();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -30,7 +30,9 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: F.sw(
|
||||||
|
defaultCall: () => AppColors.mainBackgroundColor,
|
||||||
|
xhjCall: () => AppColors.mainBackgroundColor),
|
||||||
appBar: widget.showAppBar
|
appBar: widget.showAppBar
|
||||||
? TitleAppBar(
|
? TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.personalInformation!.tr,
|
barTitle: TranslationLoader.lanKeys!.personalInformation!.tr,
|
||||||
@ -44,7 +46,8 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
|
|||||||
xhjCall: () => Container(
|
xhjCall: () => Container(
|
||||||
width: 1.sw,
|
width: 1.sw,
|
||||||
height: 0.2.sw,
|
height: 0.2.sw,
|
||||||
margin: EdgeInsets.symmetric(horizontal: 15.w),
|
margin:
|
||||||
|
EdgeInsets.only(top: 15.h, left: 20.w, right: 20.w),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.w),
|
padding: EdgeInsets.symmetric(horizontal: 25.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: const DecorationImage(
|
image: const DecorationImage(
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
@ -29,64 +29,25 @@ class _MinePersonInfoResetPasswordPageState
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
|
defaultCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
|
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
margin: EdgeInsets.only(left: 30.w, right: 30.w),
|
margin: EdgeInsets.only(left: 30.w, right: 30.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
LoginInput(
|
loginView(),
|
||||||
controller: state.oldPwdController,
|
|
||||||
onchangeAction: (textStr) {
|
|
||||||
logic.changeInput(state.oldPwdController);
|
|
||||||
},
|
|
||||||
isPwd: true,
|
|
||||||
leftWidget: Text(
|
|
||||||
"${TranslationLoader.lanKeys!.originalPassword!.tr} ",
|
|
||||||
style: TextStyle(fontSize: 22.sp),
|
|
||||||
),
|
|
||||||
hintText: "",
|
|
||||||
inputFormatters: [
|
|
||||||
LengthLimitingTextInputFormatter(20),
|
|
||||||
]),
|
|
||||||
LoginInput(
|
|
||||||
controller: state.newPwdController,
|
|
||||||
onchangeAction: (textStr) {
|
|
||||||
logic.changeInput(state.newPwdController);
|
|
||||||
},
|
|
||||||
isPwd: true,
|
|
||||||
leftWidget: Text(
|
|
||||||
"${TranslationLoader.lanKeys!.newPassword!.tr} ",
|
|
||||||
style: TextStyle(fontSize: 22.sp),
|
|
||||||
),
|
|
||||||
hintText: "",
|
|
||||||
inputFormatters: [
|
|
||||||
LengthLimitingTextInputFormatter(20),
|
|
||||||
]),
|
|
||||||
LoginInput(
|
|
||||||
controller: state.surePwdController,
|
|
||||||
onchangeAction: (textStr) {
|
|
||||||
logic.changeInput(state.surePwdController);
|
|
||||||
},
|
|
||||||
isPwd: true,
|
|
||||||
// isHaveLeftWidget: false,
|
|
||||||
leftWidget: Text(
|
|
||||||
"${TranslationLoader.lanKeys!.surePassword!.tr} ",
|
|
||||||
style: TextStyle(fontSize: 22.sp),
|
|
||||||
),
|
|
||||||
hintText: "",
|
|
||||||
inputFormatters: [
|
|
||||||
LengthLimitingTextInputFormatter(20),
|
|
||||||
]),
|
|
||||||
Container(
|
|
||||||
width: 1.sw,
|
|
||||||
padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
|
|
||||||
child: Text(
|
|
||||||
TranslationLoader.lanKeys!.registerPasswordTip!.tr,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18.w, color: AppColors.darkGrayTextColor))),
|
|
||||||
SizedBox(height: 50.w),
|
SizedBox(height: 50.w),
|
||||||
Obx(() => SubmitBtn(
|
Obx(() => SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||||
@ -123,4 +84,76 @@ class _MinePersonInfoResetPasswordPageState
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget loginView() {
|
||||||
|
Widget view = Column(
|
||||||
|
children: [
|
||||||
|
LoginInput(
|
||||||
|
controller: state.oldPwdController,
|
||||||
|
onchangeAction: (textStr) {
|
||||||
|
logic.changeInput(state.oldPwdController);
|
||||||
|
},
|
||||||
|
isPwd: true,
|
||||||
|
leftWidget: Text(
|
||||||
|
"${TranslationLoader.lanKeys!.originalPassword!.tr} ",
|
||||||
|
style: TextStyle(fontSize: 22.sp),
|
||||||
|
),
|
||||||
|
hintText: "",
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(20),
|
||||||
|
]),
|
||||||
|
LoginInput(
|
||||||
|
controller: state.newPwdController,
|
||||||
|
onchangeAction: (textStr) {
|
||||||
|
logic.changeInput(state.newPwdController);
|
||||||
|
},
|
||||||
|
isPwd: true,
|
||||||
|
leftWidget: Text(
|
||||||
|
"${TranslationLoader.lanKeys!.newPassword!.tr} ",
|
||||||
|
style: TextStyle(fontSize: 22.sp),
|
||||||
|
),
|
||||||
|
hintText: "",
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(20),
|
||||||
|
]),
|
||||||
|
LoginInput(
|
||||||
|
controller: state.surePwdController,
|
||||||
|
onchangeAction: (textStr) {
|
||||||
|
logic.changeInput(state.surePwdController);
|
||||||
|
},
|
||||||
|
isPwd: true,
|
||||||
|
// isHaveLeftWidget: false,
|
||||||
|
leftWidget: Text(
|
||||||
|
"${TranslationLoader.lanKeys!.surePassword!.tr} ",
|
||||||
|
style: TextStyle(fontSize: 22.sp),
|
||||||
|
),
|
||||||
|
hintText: "",
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(20),
|
||||||
|
]),
|
||||||
|
Container(
|
||||||
|
width: 1.sw,
|
||||||
|
padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
|
||||||
|
child: Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18.w, color: AppColors.darkGrayTextColor))),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
view = F.sw(
|
||||||
|
defaultCall: () => view,
|
||||||
|
xhjCall: () => Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 20.h,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(16.r),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: view,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
return view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_logic.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_logic.dart';
|
||||||
import 'package:star_lock/tools/custom_bottom_sheet.dart';
|
import 'package:star_lock/tools/custom_bottom_sheet.dart';
|
||||||
@ -35,10 +36,20 @@ class _MinePersonInfoSetSafetyProblemPageState
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
|
defaultCall: () => TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
|
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -93,7 +104,7 @@ class _MinePersonInfoSetSafetyProblemPageState
|
|||||||
|
|
||||||
Widget _safityProblemItem(String problemTitle, String answerTitle,
|
Widget _safityProblemItem(String problemTitle, String answerTitle,
|
||||||
TextEditingController controller, Function() action) {
|
TextEditingController controller, Function() action) {
|
||||||
return Column(
|
Widget view = Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: problemTitle,
|
leftTitel: problemTitle,
|
||||||
@ -125,6 +136,19 @@ class _MinePersonInfoSetSafetyProblemPageState
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
view = F.sw(
|
||||||
|
defaultCall: () => view,
|
||||||
|
xhjCall: () => Container(
|
||||||
|
margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: view,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future _selectProblemBottomSheet(List dataList, int problemIndex) async {
|
Future _selectProblemBottomSheet(List dataList, int problemIndex) async {
|
||||||
|
|||||||
@ -53,16 +53,44 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
|
|||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: F.sw(
|
||||||
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
|
defaultCall: () => TitleAppBar(
|
||||||
haveBack: true,
|
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
|
||||||
backgroundColor: AppColors.mainColor),
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
xhjCall: () => TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
iconColor: AppColors.blackColor,
|
||||||
|
titleColor: AppColors.blackColor,
|
||||||
|
)),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: getListDataView(),
|
child: styleHierarchy(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//样式层级
|
||||||
|
Widget styleHierarchy() {
|
||||||
|
Widget view = getListDataView();
|
||||||
|
view = F.sw(
|
||||||
|
defaultCall: () => view,
|
||||||
|
xhjCall: () => Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 20.h, left: 20.w, right: 20.w, bottom: 40.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: view,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
Widget getListDataView() {
|
Widget getListDataView() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
@ -283,6 +311,7 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
|
|||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.logout!.tr,
|
btnName: TranslationLoader.lanKeys!.logout!.tr,
|
||||||
isDelete: true,
|
isDelete: true,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 15.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
//退出登录
|
//退出登录
|
||||||
ShowTipView().showIosTipWithContentDialog("确定要退出吗?".tr, () {
|
ShowTipView().showIosTipWithContentDialog("确定要退出吗?".tr, () {
|
||||||
|
|||||||
@ -0,0 +1,128 @@
|
|||||||
|
class AdvancedFunctionRecordEntity {
|
||||||
|
int? errorCode;
|
||||||
|
String? description;
|
||||||
|
String? errorMsg;
|
||||||
|
Data? data;
|
||||||
|
|
||||||
|
AdvancedFunctionRecordEntity(
|
||||||
|
{this.errorCode, this.description, this.errorMsg, this.data});
|
||||||
|
|
||||||
|
AdvancedFunctionRecordEntity.fromJson(Map<String, dynamic> json) {
|
||||||
|
errorCode = json['errorCode'];
|
||||||
|
description = json['description'];
|
||||||
|
errorMsg = json['errorMsg'];
|
||||||
|
data = json['data'] != null ? Data.fromJson(json['data']) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['errorCode'] = errorCode;
|
||||||
|
data['description'] = description;
|
||||||
|
data['errorMsg'] = errorMsg;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
int? pageNo;
|
||||||
|
int? pageSize;
|
||||||
|
int? total;
|
||||||
|
List<RecordItem>? recordList;
|
||||||
|
|
||||||
|
Data({this.pageNo, this.pageSize, this.total, this.recordList});
|
||||||
|
|
||||||
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
|
pageNo = json['pageNo'];
|
||||||
|
pageSize = json['pageSize'];
|
||||||
|
total = json['total'];
|
||||||
|
if (json['list'] != null) {
|
||||||
|
recordList = <RecordItem>[];
|
||||||
|
json['list'].forEach((v) {
|
||||||
|
recordList!.add(RecordItem.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['pageNo'] = pageNo;
|
||||||
|
data['pageSize'] = pageSize;
|
||||||
|
data['total'] = total;
|
||||||
|
if (recordList != null) {
|
||||||
|
data['list'] = recordList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RecordItem {
|
||||||
|
int? id;
|
||||||
|
int? userId;
|
||||||
|
String? orderNumber;
|
||||||
|
String? type;
|
||||||
|
int? recordType;
|
||||||
|
int? smsCount;
|
||||||
|
int? emailCount;
|
||||||
|
int? cloudauthCount;
|
||||||
|
int? vipLockCount;
|
||||||
|
int? vipYear;
|
||||||
|
int? isApply;
|
||||||
|
String? money;
|
||||||
|
String? createdAt;
|
||||||
|
String? updatedAt;
|
||||||
|
|
||||||
|
RecordItem(
|
||||||
|
{this.id,
|
||||||
|
this.userId,
|
||||||
|
this.orderNumber,
|
||||||
|
this.type,
|
||||||
|
this.recordType,
|
||||||
|
this.smsCount,
|
||||||
|
this.emailCount,
|
||||||
|
this.cloudauthCount,
|
||||||
|
this.vipLockCount,
|
||||||
|
this.vipYear,
|
||||||
|
this.isApply,
|
||||||
|
this.money,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt});
|
||||||
|
|
||||||
|
RecordItem.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
userId = json['user_id'];
|
||||||
|
orderNumber = json['order_number'];
|
||||||
|
type = json['type'];
|
||||||
|
recordType = json['record_type'];
|
||||||
|
smsCount = json['sms_count'];
|
||||||
|
emailCount = json['email_count'];
|
||||||
|
cloudauthCount = json['cloudauth_count'];
|
||||||
|
vipLockCount = json['vip_lock_count'];
|
||||||
|
vipYear = json['vip_year'];
|
||||||
|
isApply = json['is_apply'];
|
||||||
|
money = json['money'];
|
||||||
|
createdAt = json['created_at'];
|
||||||
|
updatedAt = json['updated_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['id'] = id;
|
||||||
|
data['user_id'] = userId;
|
||||||
|
data['order_number'] = orderNumber;
|
||||||
|
data['type'] = type;
|
||||||
|
data['record_type'] = recordType;
|
||||||
|
data['sms_count'] = smsCount;
|
||||||
|
data['email_count'] = emailCount;
|
||||||
|
data['cloudauth_count'] = cloudauthCount;
|
||||||
|
data['vip_lock_count'] = vipLockCount;
|
||||||
|
data['vip_year'] = vipYear;
|
||||||
|
data['is_apply'] = isApply;
|
||||||
|
data['money'] = money;
|
||||||
|
data['created_at'] = createdAt;
|
||||||
|
data['updated_at'] = updatedAt;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_state.dart';
|
||||||
|
|
||||||
|
import '../../../../network/api_repository.dart';
|
||||||
|
import '../../../../tools/baseGetXController.dart';
|
||||||
|
|
||||||
|
class AdvancedFunctionRecordLogic extends BaseGetXController {
|
||||||
|
AdvancedFunctionRecordState state = AdvancedFunctionRecordState();
|
||||||
|
|
||||||
|
//获取购买记录列表
|
||||||
|
Future<void> getBuyRecordList() async {
|
||||||
|
var entity = await ApiRepository.to.advancedFunctionBuyRecordList(
|
||||||
|
type: 'vip', pageNo: 1, recordType: 10, pageSize: 10);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
state.buyRecordList.value = entity.data!.recordList!;
|
||||||
|
state.buyRecordList.refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
import 'package:flutter/material.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/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_entity.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_logic.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
|
import '../../../tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class AdvancedFunctionRecordPage extends StatefulWidget {
|
||||||
|
const AdvancedFunctionRecordPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AdvancedFunctionRecordPage> createState() =>
|
||||||
|
_AdvancedFunctionRecordPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AdvancedFunctionRecordPageState
|
||||||
|
extends State<AdvancedFunctionRecordPage> {
|
||||||
|
final logic = Get.put(AdvancedFunctionRecordLogic());
|
||||||
|
final state = Get.find<AdvancedFunctionRecordLogic>().state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
logic.getBuyRecordList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: "记录".tr,
|
||||||
|
haveBack: true,
|
||||||
|
iconColor: Colors.black,
|
||||||
|
titleColor: Colors.black,
|
||||||
|
backgroundColor: Colors.white),
|
||||||
|
body: Container(
|
||||||
|
color: AppColors.mainBackgroundColor,
|
||||||
|
child: Obx(() => state.buyRecordList.isEmpty
|
||||||
|
? NoData()
|
||||||
|
: ListView.builder(
|
||||||
|
itemCount: state.buyRecordList.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return _recordKeyItem(state.buyRecordList[index]);
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _recordKeyItem(RecordItem itemData) {
|
||||||
|
return Container(
|
||||||
|
color: Colors.white,
|
||||||
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 10.h),
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(left: 20.w, right: 20.w, top: 16.h, bottom: 16.h),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
itemData.createdAt!.length > 10
|
||||||
|
? itemData.createdAt!.substring(0, 10)
|
||||||
|
: itemData.createdAt!,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
Expanded(child: Container()),
|
||||||
|
Text('¥${itemData.money}',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontWeight: FontWeight.bold)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8.h,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('${itemData.vipLockCount}把锁/${itemData.vipYear}年',
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp, color: AppColors.darkGrayTextColor))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_entity.dart';
|
||||||
|
|
||||||
|
class AdvancedFunctionRecordState {
|
||||||
|
var buyRecordList = <RecordItem>[].obs;
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
class ValueAddedServicesHighFunctionEntity {
|
||||||
|
int? errorCode;
|
||||||
|
String? description;
|
||||||
|
String? errorMsg;
|
||||||
|
Data? data;
|
||||||
|
|
||||||
|
ValueAddedServicesHighFunctionEntity(
|
||||||
|
{this.errorCode, this.description, this.errorMsg, this.data});
|
||||||
|
|
||||||
|
ValueAddedServicesHighFunctionEntity.fromJson(Map<String, dynamic> json) {
|
||||||
|
errorCode = json['errorCode'];
|
||||||
|
description = json['description'];
|
||||||
|
errorMsg = json['errorMsg'];
|
||||||
|
data = json['data'] != null ? Data.fromJson(json['data']) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['errorCode'] = errorCode;
|
||||||
|
data['description'] = description;
|
||||||
|
data['errorMsg'] = errorMsg;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
int? emailCount;
|
||||||
|
int? smsCount;
|
||||||
|
int? cloudauthCount;
|
||||||
|
int? vipStatus;
|
||||||
|
int? vipLockCount;
|
||||||
|
String? vipExpireAt;
|
||||||
|
|
||||||
|
Data(
|
||||||
|
{this.emailCount,
|
||||||
|
this.smsCount,
|
||||||
|
this.cloudauthCount,
|
||||||
|
this.vipStatus,
|
||||||
|
this.vipLockCount,
|
||||||
|
this.vipExpireAt});
|
||||||
|
|
||||||
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
|
emailCount = json['email_count'];
|
||||||
|
smsCount = json['sms_count'];
|
||||||
|
cloudauthCount = json['cloudauth_count'];
|
||||||
|
vipStatus = json['vip_status'];
|
||||||
|
vipLockCount = json['vip_lock_count'];
|
||||||
|
vipExpireAt = json['vip_expire_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['email_count'] = emailCount;
|
||||||
|
data['sms_count'] = smsCount;
|
||||||
|
data['cloudauth_count'] = cloudauthCount;
|
||||||
|
data['vip_status'] = vipStatus;
|
||||||
|
data['vip_lock_count'] = vipLockCount;
|
||||||
|
data['vip_expire_at'] = vipExpireAt;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -12,6 +12,9 @@ class ValueAddedServicesHighFunctionLogic extends BaseGetXController {
|
|||||||
//获取增值服务用户余量包
|
//获取增值服务用户余量包
|
||||||
Future<void> getServiceUserPackage() async {
|
Future<void> getServiceUserPackage() async {
|
||||||
var entity = await ApiRepository.to.getServiceUserPackage();
|
var entity = await ApiRepository.to.getServiceUserPackage();
|
||||||
if (entity.errorCode!.codeIsSuccessful) {}
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
state.vipExpireDate.value = entity.data!.vipExpireAt!;
|
||||||
|
state.vipExpireDate.refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_logic.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_logic.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
@ -33,7 +34,7 @@ class _ValueAddedServicesHighFunctionPageState
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.advancedFunction!.tr,
|
barTitle: "高级功能".tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
iconColor: Colors.black,
|
iconColor: Colors.black,
|
||||||
titleColor: Colors.black,
|
titleColor: Colors.black,
|
||||||
@ -67,52 +68,60 @@ class _ValueAddedServicesHighFunctionPageState
|
|||||||
topRight: Radius.circular(30.h),
|
topRight: Radius.circular(30.h),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Stack(
|
child: GestureDetector(
|
||||||
alignment: AlignmentDirectional.centerStart,
|
onTap: () {
|
||||||
children: [
|
Get.toNamed(Routers.advancedFunctionRecordPage);
|
||||||
Row(
|
},
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
child: Container(
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
color: Colors.transparent,
|
||||||
|
child: Stack(
|
||||||
|
alignment: AlignmentDirectional.centerStart,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Column(
|
||||||
"已开通".tr,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
style:
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
|
children: [
|
||||||
|
Text(
|
||||||
|
"已开通".tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
SizedBox(height: 5.h),
|
||||||
|
Obx(() => Text(
|
||||||
|
"${TranslationLoader.lanKeys!.periodValidity!.tr}:${state.vipExpireDate.value}",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp, fontWeight: FontWeight.w600),
|
||||||
|
)),
|
||||||
|
], //
|
||||||
),
|
),
|
||||||
SizedBox(height: 5.h),
|
],
|
||||||
Text(
|
|
||||||
"${TranslationLoader.lanKeys!.periodValidity!.tr}:2023-07-29",
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
], //
|
|
||||||
),
|
),
|
||||||
|
Positioned(
|
||||||
|
bottom: 0.h,
|
||||||
|
right: 0.w,
|
||||||
|
child: Container(
|
||||||
|
width: 90.w,
|
||||||
|
height: 50.h,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: const Color(0xFFBDCDDF),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(30.h),
|
||||||
|
bottomLeft: Radius.circular(30.h),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
TranslationLoader.lanKeys!.record!.tr,
|
||||||
|
style: TextStyle(fontSize: 22.sp),
|
||||||
|
)),
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Positioned(
|
),
|
||||||
bottom: 0.h,
|
|
||||||
right: 0.w,
|
|
||||||
child: Container(
|
|
||||||
width: 90.w,
|
|
||||||
height: 50.h,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color(0xFFBDCDDF),
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(30.h),
|
|
||||||
bottomLeft: Radius.circular(30.h),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationLoader.lanKeys!.record!.tr,
|
|
||||||
style: TextStyle(fontSize: 22.sp),
|
|
||||||
)),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +1,5 @@
|
|||||||
class ValueAddedServicesHighFunctionState {}
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class ValueAddedServicesHighFunctionState {
|
||||||
|
var vipExpireDate = ''.obs;
|
||||||
|
}
|
||||||
|
|||||||
@ -785,8 +785,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
jsonEncode({
|
jsonEncode({
|
||||||
'lockId': lockId,
|
'lockId': lockId,
|
||||||
}),
|
}),
|
||||||
isUnShowLoading: true
|
isUnShowLoading: true);
|
||||||
);
|
|
||||||
|
|
||||||
// 锁诊断
|
// 锁诊断
|
||||||
Future<Response> setLockDiagnoseData(
|
Future<Response> setLockDiagnoseData(
|
||||||
@ -1999,6 +1998,22 @@ class ApiProvider extends BaseProvider {
|
|||||||
// 获取增值服务用户余量包
|
// 获取增值服务用户余量包
|
||||||
Future<Response> getServiceUserPackage() =>
|
Future<Response> getServiceUserPackage() =>
|
||||||
post(getServiceUserPackageURL.toUrl, jsonEncode({}));
|
post(getServiceUserPackageURL.toUrl, jsonEncode({}));
|
||||||
|
|
||||||
|
// 高级功能购买记录
|
||||||
|
Future<Response> advancedFunctionBuyRecordList(
|
||||||
|
String type,
|
||||||
|
int pageNo,
|
||||||
|
int recordType,
|
||||||
|
int pageSize,
|
||||||
|
) =>
|
||||||
|
post(
|
||||||
|
getBuyRecordListURL.toUrl,
|
||||||
|
jsonEncode({
|
||||||
|
'type': type,
|
||||||
|
'pageNo': pageNo,
|
||||||
|
'pageSize': pageSize,
|
||||||
|
'record_type': recordType,
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ExtensionString on String {
|
extension ExtensionString on String {
|
||||||
|
|||||||
@ -27,6 +27,8 @@ import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList/keyList
|
|||||||
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
||||||
import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart';
|
import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart';
|
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_entity.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_entity.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/face_authentication_entity.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/face_authentication_entity.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/buy_record_list_entity.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/buy_record_list_entity.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_entity.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_entity.dart';
|
||||||
@ -2024,8 +2026,20 @@ class ApiRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取增值服务用户余量包
|
// 获取增值服务用户余量包
|
||||||
Future<AdvancedFeaturesWebEntity> getServiceUserPackage() async {
|
Future<ValueAddedServicesHighFunctionEntity> getServiceUserPackage() async {
|
||||||
final res = await apiProvider.getServiceUserPackage();
|
final res = await apiProvider.getServiceUserPackage();
|
||||||
return AdvancedFeaturesWebEntity.fromJson(res.body);
|
return ValueAddedServicesHighFunctionEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 高级功能购买记录
|
||||||
|
Future<AdvancedFunctionRecordEntity> advancedFunctionBuyRecordList({
|
||||||
|
required String type,
|
||||||
|
required int pageNo,
|
||||||
|
required int recordType,
|
||||||
|
required int pageSize,
|
||||||
|
}) async {
|
||||||
|
final res = await apiProvider.advancedFunctionBuyRecordList(
|
||||||
|
type, pageNo, recordType, pageSize);
|
||||||
|
return AdvancedFunctionRecordEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,8 +19,9 @@ class AppFirstEnterHandle {
|
|||||||
switch (flagStr) {
|
switch (flagStr) {
|
||||||
case isAgreePrivacy: // 隐私协议
|
case isAgreePrivacy: // 隐私协议
|
||||||
{
|
{
|
||||||
if (getFlag != isAgreePrivacy)
|
if (getFlag != isAgreePrivacy) {
|
||||||
showPrivacyAgreementAlert(widgetContext);
|
showPrivacyAgreementAlert(widgetContext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case isAgreePosition: // 位置权限
|
case isAgreePosition: // 位置权限
|
||||||
|
|||||||
@ -12,34 +12,45 @@ class CustomNetworkImage extends StatelessWidget {
|
|||||||
final double width;
|
final double width;
|
||||||
final double height;
|
final double height;
|
||||||
final BoxFit boxFit;
|
final BoxFit boxFit;
|
||||||
const CustomNetworkImage({Key? key, required this.url, required this.defaultUrl, required this.width, required this.height, this.boxFit=BoxFit.cover}) : super(key: key);
|
|
||||||
|
const CustomNetworkImage(
|
||||||
|
{Key? key,
|
||||||
|
required this.url,
|
||||||
|
required this.defaultUrl,
|
||||||
|
required this.width,
|
||||||
|
required this.height,
|
||||||
|
this.boxFit = BoxFit.cover})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return url.isNotEmpty ? CachedNetworkImage(
|
return url.isNotEmpty
|
||||||
width: width,
|
? CachedNetworkImage(
|
||||||
height: height,
|
width: width,
|
||||||
fit: boxFit,
|
height: height,
|
||||||
imageUrl: url,
|
fit: boxFit,
|
||||||
imageBuilder: (context, imageProvider) => Container(
|
imageUrl: url,
|
||||||
decoration: BoxDecoration(
|
imageBuilder: (context, imageProvider) => Container(
|
||||||
image: DecorationImage(
|
decoration: BoxDecoration(
|
||||||
image: imageProvider,
|
image: DecorationImage(
|
||||||
fit: boxFit,
|
image: imageProvider,
|
||||||
colorFilter: const ColorFilter.mode(Colors.transparent, BlendMode.colorBurn)),
|
fit: boxFit,
|
||||||
),
|
colorFilter: const ColorFilter.mode(
|
||||||
),
|
Colors.transparent, BlendMode.colorBurn)),
|
||||||
errorWidget: (context, url, error) => Image.asset(
|
),
|
||||||
defaultUrl,
|
),
|
||||||
width: width,
|
errorWidget: (context, url, error) => Image.asset(
|
||||||
height: height,
|
defaultUrl,
|
||||||
fit: BoxFit.fill,
|
width: width,
|
||||||
),
|
height: height,
|
||||||
) :Image.asset(
|
fit: BoxFit.fill,
|
||||||
defaultUrl,
|
),
|
||||||
width: width,
|
)
|
||||||
height: height,
|
: Image.asset(
|
||||||
fit: BoxFit.fill,
|
defaultUrl,
|
||||||
);
|
width: width,
|
||||||
|
height: height,
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,7 @@ class SubmitBtn extends StatelessWidget {
|
|||||||
bool? isDelete;
|
bool? isDelete;
|
||||||
|
|
||||||
bool? isDisabled;
|
bool? isDisabled;
|
||||||
|
|
||||||
SubmitBtn({
|
SubmitBtn({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.btnName,
|
required this.btnName,
|
||||||
@ -48,7 +49,7 @@ class SubmitBtn extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
return Container(
|
||||||
width: ScreenUtil().screenWidth - 40.w,
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
height: 60.h,
|
height: 60.h,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
|
|||||||
@ -37,8 +37,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# 1.0.27+2024042204 打包鑫锁提审ios与 android
|
# 1.0.27+2024042204 打包鑫锁提审ios与 android
|
||||||
# 1.0.28+2024042601 打包鑫锁提审华为
|
# 1.0.28+2024042601 打包鑫锁提审华为
|
||||||
# 1.0.29+2024042901 打包给欧阳测试
|
# 1.0.29+2024042901 打包给欧阳测试
|
||||||
|
# 1.0.30+2024043001 打包鑫锁提审ios
|
||||||
|
|
||||||
version: 1.0.29+2024042901
|
version: 1.0.30+2024043001
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user