This commit is contained in:
魏少阳 2024-04-30 14:46:11 +08:00
commit 06c41eb130
41 changed files with 1878 additions and 1101 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

File diff suppressed because it is too large Load Diff

View File

@ -806,5 +806,14 @@
"已开通":"已开通",
"该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用",
"常用程序":"常用程序",
"该锁已被重置":"该锁已被重置"
"该锁已被重置":"该锁已被重置",
"需要访问读写权限才能使用手动升级固件":"需要访问读写权限才能使用手动升级固件",
"错误D固件请选择正确的文件":"错误固件,请选择正确的文件",
"非SYD固件请选择正确的文件":"非SYD固件请选择正确的文件",
"文件校验失败 0x01":"文件校验失败 0x01",
"解析元数据失败,请选择正确的文件":"解析元数据失败,请选择正确的文件",
"文件校验失败 0x02":"文件校验失败 0x02",
"文件校验失败 0x03":"文件校验失败 0x03",
"固件升级完成":"固件升级完成",
"记录":"记录"
}

View File

@ -809,5 +809,14 @@
"已开通":"已开通",
"该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用",
"常用程序":"常用程序",
"该锁已被重置":"该锁已被重置"
"该锁已被重置":"该锁已被重置",
"记录":"记录",
"需要访问读写权限才能使用手动升级固件":"需要访问读写权限才能使用手动升级固件",
"错误D固件请选择正确的文件":"错误固件,请选择正确的文件",
"非SYD固件请选择正确的文件":"非SYD固件请选择正确的文件",
"文件校验失败 0x01":"文件校验失败 0x01",
"解析元数据失败,请选择正确的文件":"解析元数据失败,请选择正确的文件",
"文件校验失败 0x02":"文件校验失败 0x02",
"文件校验失败 0x03":"文件校验失败 0x03",
"固件升级完成":"固件升级完成"
}

View File

@ -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/transferSmartLockList/transferSmartLock_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 'common/safetyVerification/safetyVerification_page.dart';
@ -447,6 +448,8 @@ abstract class Routers {
static const seletKeyCyclicDatePage =
'/SeletKeyCyclicDatePage'; //
static const advancedFeaturesWebPage = '/advancedFeaturesWebPage'; //
static const advancedFunctionRecordPage =
'/advancedFunctionRecordPage'; //
}
abstract class AppRouters {
@ -1068,6 +1071,9 @@ abstract class AppRouters {
GetPage(name: Routers.addPalmPage, page: (() => const AddPalmPage())),
GetPage(
name: Routers.advancedFeaturesWebPage,
page: (() => AdvancedFeaturesWebPage()))
page: (() => AdvancedFeaturesWebPage())),
GetPage(
name: Routers.advancedFunctionRecordPage,
page: (() => const AdvancedFunctionRecordPage())),
];
}

View File

@ -127,7 +127,7 @@ class _LockDetailPageState extends State<LockDetailPage>
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
bool ifHaveKey = await Storage.ifHaveKey(saveBlueToken);
if(!ifHaveKey){
if (!ifHaveKey) {
var saveTokenList = changeIntListToStringList([0, 0, 0, 0]);
Storage.setStringList(saveBlueToken, saveTokenList);
}
@ -172,7 +172,7 @@ class _LockDetailPageState extends State<LockDetailPage>
onTap: onTap,
child: Container(
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(
color: Colors.white,
borderRadius: BorderRadius.circular(16.r),
@ -232,79 +232,78 @@ class _LockDetailPageState extends State<LockDetailPage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Spacer(),
Obx(() {
return GestureDetector(
onTap: state.openDoorBtnisUneable.value == true
? () {
setState(() {
startOpenLock();
});
}
: null,
onLongPressStart: state.openDoorBtnisUneable.value == true
? (details) {
setState(() {
startUnLock();
});
}
: null,
child: Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.9),
borderRadius: BorderRadius.circular(100.w),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.3),
offset: Offset(0, 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,
),
GestureDetector(
onTap: state.openDoorBtnisUneable.value == true
? () {
setState(() {
startOpenLock();
});
}
: null,
onLongPressStart: state.openDoorBtnisUneable.value == true
? (details) {
setState(() {
startUnLock();
});
}
: null,
child: Container(
width: 100.r,
height: 100.r,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(100.w),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.3),
offset: Offset(0, 0),
blurRadius: 10.r,
spreadRadius: 0,
),
state.openDoorBtnisUneable.value == false
? Positioned(
child: FlavorsImg(
]),
margin: EdgeInsets.only(left: 35.w, bottom: 15.h),
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(
'images/main/icon_main_openLockBtn_grey.png',
width: 96.r,
height: 96.r,
),
),
)
: 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,
),
)),
],
),
'images/icon_circle_dotted.png',
width: 88.r,
height: 88.r,
color: state.isOpenPassageMode.value == 1
? Colors.red
: AppColors.mainColor,
)),
],
),
);
}),
),
),
Padding(
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
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(
{required double width, required double height}) {

View File

@ -47,7 +47,7 @@ class LockEscalationLogic extends BaseGetXController {
//
Future<void> otaUpdate() async {
var status = await PermissionDialog.request(
Permission.storage, '需要访问读写权限才能使用手动升级固件');
Permission.storage, '需要访问读写权限才能使用手动升级固件'.tr);
if (status != true) {
return;
}
@ -161,24 +161,52 @@ class LockEscalationLogic extends BaseGetXController {
//
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') {
showToast('非SYD固件请选择正确的文件');
showToast('非SYD固件请选择正确的文件'.tr);
return null;
}
//
Uint8List metaLenList = data.sublist(12, 16);
int metaLen = ByteData.sublistView(metaLenList).getUint32(0);
Uint8List metaLenList;
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) {
showToast('文件校验失败 0x01');
showToast('文件校验失败 0x01'.tr);
return null;
}
//
Uint8List metaStrList = data.sublist(16, 16 + metaLen);
String metaStr = utf8.decode(metaStrList);
Uint8List metaStrList;
String metaStr;
try {
metaStrList = data.sublist(16, 16 + metaLen);
metaStr = utf8.decode(metaStrList);
} catch (e) {
showToast('解析元数据失败,请选择正确的文件'.tr);
return null;
}
AppLog.log(metaStr);
var meta = jsonDecode(metaStr);
if (meta is! Map) {
showToast('解析元数据失败,请选择正确的文件'.tr);
return null;
}
return meta..['metaLen'] = metaLen;
}
@ -191,11 +219,11 @@ class LockEscalationLogic extends BaseGetXController {
String md5Str = md5.convert(bin).toString().toUpperCase();
AppLog.log('---> $md5Str ${meta['fwMd5']}');
if (md5Str != meta['fwMd5']) {
showToast('文件校验失败 0x02');
showToast('文件校验失败 0x02'.tr);
return null;
}
if (bin.length != meta['fwSize']) {
showToast('文件校验失败 0x03');
showToast('文件校验失败 0x03'.tr);
return null;
}
return bin;
@ -225,7 +253,7 @@ class LockEscalationLogic extends BaseGetXController {
processOtaUpgrade();
} else if (reply is ConfirmationOTAUpgradeReply && reply.status == 0x00) {
closeOTADAta();
showToast('固件升级完成');
showToast('固件升级完成'.tr);
}
});
}

View File

@ -152,6 +152,10 @@ class _MsgNotificationPageState extends State<MsgNotificationPage> {
SizedBox(width: 60.w, height: 50.h, child: _switch(4)))),
SizedBox(
height: 60.h,
),
Text(
'此模块功能需要锁联网后设置方可生效',
style: TextStyle(fontSize: 20.sp),
)
],
);

View File

@ -163,6 +163,11 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
return returnWidget;
}
//
Widget XHJBg({required Widget child}) {
return Container();
}
Widget unHaveData() {
return ListView(
children: [

View File

@ -86,7 +86,8 @@ class _StarLockMainXHJPageState extends State<StarLockMainXHJPage>
],
),
bottomNavigationBar: Container(
padding: EdgeInsets.only(top: 20.h),
padding: EdgeInsets.only(
top: 20.h, bottom: GetPlatform.isAndroid ? 20.h : 0),
decoration: const BoxDecoration(
color: Colors.transparent,
border: Border(

View File

@ -49,155 +49,196 @@ class _AboutPageState extends State<AboutPage> {
builder: (AboutConsole logic) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.about!.tr,
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(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Align(
alignment: Alignment.topRight,
child: GestureDetector(
onTap: logic.handleTap,
child: Container(
color: Colors.transparent,
width: 80.w,
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
});
}),
F.sw(
defaultCall: () => logoView(),
xhjCall: () => const SizedBox()),
listView(),
F.sw(
defaultCall: () => const SizedBox(),
xhjCall: () => logoView()),
],
),
);
});
}
//
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),
),
],
),
);
});
}
}

View File

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.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/tools/appFirstEnterHandle.dart';
import 'package:star_lock/tools/storage.dart';
@ -30,10 +31,20 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
builder: (AddLockLogic logic) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
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(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,

View File

@ -1,10 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import '../../../app_settings/app_colors.dart';
import '../../../blue/blue_manage.dart';
import '../../../tools/appRouteObserver.dart';
@ -27,30 +27,48 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
CupertinoActivityIndicator(radius: 18.w, color: Colors.white,),
SizedBox(width: 30.w)
],
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
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(() {
return ListView.separated(
itemCount: state.devices.length,
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);
// 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);
// 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(
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(
// mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -92,7 +117,18 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// 323300 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(
@ -173,5 +209,4 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
logic.stopScanBlueList();
BlueManage().disconnect();
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -18,7 +17,8 @@ class SelectLockTypePage extends StatefulWidget {
State<SelectLockTypePage> createState() => _SelectLockTypePageState();
}
class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget {
class _SelectLockTypePageState extends State<SelectLockTypePage>
with BaseWidget {
final logic = Get.put(SelectLockTypeLogic());
final state = Get.find<SelectLockTypeLogic>().state;
@ -26,121 +26,165 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
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(
children: [
allLock(),
Expanded(
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);
}),
],
),
),
)
lockTypeList(),
],
),
);
}
//
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 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(
onTap: () {
Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 0});
},
child: Container(
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),
],
),
),
child: view,
);
}
@ -150,8 +194,14 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
onTap: action,
child: Container(
height: 120.h,
color: Colors.white,
// margin: EdgeInsets.all(10),
decoration: F.sw(
defaultCall: () => const BoxDecoration(
color: Colors.white,
),
xhjCall: () => BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20.r),
)),
child: Row(
children: [
SizedBox(width: 30.w),

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import '../../../app_settings/app_colors.dart';
import '../../../tools/dateTool.dart';
@ -22,28 +22,55 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: "消息详情".tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
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),
Text(
state.itemData.value.data!,
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
),
],
)),
)
backgroundColor: AppColors.mainBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: "消息详情".tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: "消息详情".tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
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,
),
));
}
}

View File

@ -72,6 +72,9 @@ class _MessageListXHJPageState extends State<MessageListXHJPage>
: null,
body: Column(
children: [
SizedBox(
height: 15.h,
),
Container(
width: 1.sw,
height: 0.2.sw,

View File

@ -77,10 +77,11 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
child: ClipRRect(
borderRadius: BorderRadius.circular(52.5.w),
child: CustomNetworkImage(
url: state.userHeadUrl.value ?? "",
defaultUrl: 'images/controls_user.png',
width: 105.w,
height: 105.h),
url: state.userHeadUrl.value ?? "",
defaultUrl: 'images/controls_user.png',
width: 105.w,
height: 105.h,
),
),
)),
),

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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/tools/tf_input_haveBorder.dart';
@ -26,10 +27,20 @@ class _MineUnbindPhoneOrEmailState extends State<MineUnbindPhoneOrEmailPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
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(
children: [
Container(

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_logic.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../tools/submitBtn.dart';
@ -25,10 +26,20 @@ class _MinePersonInfoEditAccountNextPageState
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
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(
children: [
Container(

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart';
import '../../../app_settings/app_colors.dart';
@ -25,45 +26,89 @@ class _MinePersonInfoEditNamePageState
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.save!.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
backgroundColor: AppColors.greyBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
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("请输入昵称");
} else {
logic.updateUserInfoRequest();
}
},
),
],
],
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
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(
padding: EdgeInsets.all(15.w),
child: Column(
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),
]),
],
),
child: listView(),
));
}
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;
}
}

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart';
import '../../../appRouters.dart';
@ -28,12 +29,24 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr,
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(
color: Colors.white,
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
@ -58,11 +71,12 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
rightWidget: Text(
'${state.countryName.value} +${state.countryCode.value}',
textAlign: TextAlign.end,
style:
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
style: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
),
action: () async {
var result = await Get.toNamed(Routers.selectCountryRegionPage);
var result =
await Get.toNamed(Routers.selectCountryRegionPage);
if (result != null) {
result as Map<String, dynamic>;
state.countryCode.value = result['code'];
@ -105,7 +119,8 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
),
Obx(() => GestureDetector(
onTap: () {
if (state.accountIsOK.value && state.canResend.value) {
if (state.accountIsOK.value &&
state.canResend.value) {
logic.sendValidationCode();
}
},

View File

@ -30,7 +30,9 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
backgroundColor: F.sw(
defaultCall: () => AppColors.mainBackgroundColor,
xhjCall: () => AppColors.mainBackgroundColor),
appBar: widget.showAppBar
? TitleAppBar(
barTitle: TranslationLoader.lanKeys!.personalInformation!.tr,
@ -44,7 +46,8 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
xhjCall: () => Container(
width: 1.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),
decoration: BoxDecoration(
image: const DecorationImage(

View File

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart';
import '../../../appRouters.dart';
@ -29,64 +29,25 @@ class _MinePersonInfoResetPasswordPageState
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
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(
margin: EdgeInsets.only(left: 30.w, right: 30.w),
child: 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))),
loginView(),
SizedBox(height: 50.w),
Obx(() => SubmitBtn(
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;
}
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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_logic.dart';
import 'package:star_lock/tools/custom_bottom_sheet.dart';
@ -35,10 +36,20 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
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(
children: [
Container(
@ -93,7 +104,7 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget _safityProblemItem(String problemTitle, String answerTitle,
TextEditingController controller, Function() action) {
return Column(
Widget view = Column(
children: [
CommonItem(
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 {

View File

@ -53,16 +53,44 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
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(
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() {
return Column(
children: [
@ -283,6 +311,7 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
SubmitBtn(
btnName: TranslationLoader.lanKeys!.logout!.tr,
isDelete: true,
padding: EdgeInsets.symmetric(horizontal: 15.w),
onClick: () {
//退
ShowTipView().showIosTipWithContentDialog("确定要退出吗?".tr, () {

View File

@ -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;
}
}

View File

@ -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();
}
}
}

View File

@ -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))
],
),
],
),
);
}
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -12,6 +12,9 @@ class ValueAddedServicesHighFunctionLogic extends BaseGetXController {
//
Future<void> getServiceUserPackage() async {
var entity = await ApiRepository.to.getServiceUserPackage();
if (entity.errorCode!.codeIsSuccessful) {}
if (entity.errorCode!.codeIsSuccessful) {
state.vipExpireDate.value = entity.data!.vipExpireAt!;
state.vipExpireDate.refresh();
}
}
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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 '../../../appRouters.dart';
@ -33,7 +34,7 @@ class _ValueAddedServicesHighFunctionPageState
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.advancedFunction!.tr,
barTitle: "高级功能".tr,
haveBack: true,
iconColor: Colors.black,
titleColor: Colors.black,
@ -67,52 +68,60 @@ class _ValueAddedServicesHighFunctionPageState
topRight: Radius.circular(30.h),
),
),
child: Stack(
alignment: AlignmentDirectional.centerStart,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
child: GestureDetector(
onTap: () {
Get.toNamed(Routers.advancedFunctionRecordPage);
},
child: Container(
color: Colors.transparent,
child: Stack(
alignment: AlignmentDirectional.centerStart,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
Row(
mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"已开通".tr,
style:
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
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),
)),
)),
],
),
),
);
}

View File

@ -1 +1,5 @@
class ValueAddedServicesHighFunctionState {}
import 'package:get/get.dart';
class ValueAddedServicesHighFunctionState {
var vipExpireDate = ''.obs;
}

View File

@ -785,8 +785,7 @@ class ApiProvider extends BaseProvider {
jsonEncode({
'lockId': lockId,
}),
isUnShowLoading: true
);
isUnShowLoading: true);
//
Future<Response> setLockDiagnoseData(
@ -1999,6 +1998,22 @@ class ApiProvider extends BaseProvider {
//
Future<Response> getServiceUserPackage() =>
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 {

View File

@ -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/weChatQRCodeEntity.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/valueAddedServicesRecord/buy_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();
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);
}
}

View File

@ -19,8 +19,9 @@ class AppFirstEnterHandle {
switch (flagStr) {
case isAgreePrivacy: //
{
if (getFlag != isAgreePrivacy)
if (getFlag != isAgreePrivacy) {
showPrivacyAgreementAlert(widgetContext);
}
}
break;
case isAgreePosition: //

View File

@ -12,34 +12,45 @@ class CustomNetworkImage extends StatelessWidget {
final double width;
final double height;
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
Widget build(BuildContext context) {
return url.isNotEmpty ? CachedNetworkImage(
width: width,
height: height,
fit: boxFit,
imageUrl: url,
imageBuilder: (context, imageProvider) => Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: boxFit,
colorFilter: const ColorFilter.mode(Colors.transparent, BlendMode.colorBurn)),
),
),
errorWidget: (context, url, error) => Image.asset(
defaultUrl,
width: width,
height: height,
fit: BoxFit.fill,
),
) :Image.asset(
defaultUrl,
width: width,
height: height,
fit: BoxFit.fill,
);
return url.isNotEmpty
? CachedNetworkImage(
width: width,
height: height,
fit: boxFit,
imageUrl: url,
imageBuilder: (context, imageProvider) => Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: boxFit,
colorFilter: const ColorFilter.mode(
Colors.transparent, BlendMode.colorBurn)),
),
),
errorWidget: (context, url, error) => Image.asset(
defaultUrl,
width: width,
height: height,
fit: BoxFit.fill,
),
)
: Image.asset(
defaultUrl,
width: width,
height: height,
fit: BoxFit.fill,
);
}
}

View File

@ -31,6 +31,7 @@ class SubmitBtn extends StatelessWidget {
bool? isDelete;
bool? isDisabled;
SubmitBtn({
Key? key,
required this.btnName,
@ -48,7 +49,7 @@ class SubmitBtn extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
return Container(
width: ScreenUtil().screenWidth - 40.w,
height: 60.h,
child: ElevatedButton(

View File

@ -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.28+2024042601 打包鑫锁提审华为
# 1.0.29+2024042901 打包给欧阳测试
# 1.0.30+2024043001 打包鑫锁提审ios
version: 1.0.29+2024042901
version: 1.0.30+2024043001
environment:
sdk: '>=2.12.0 <3.0.0'