1,新增部分图片

2,更新考勤模块UI
3,更新电子钥匙模块UI
4,更新密码模块UI
5,更新卡、指纹、遥控模块UI
6,更新授权管理员模块UI
7,更新锁设置模块UI
9,新增拥有的锁界面布局
This commit is contained in:
Daisy 2023-07-28 15:37:33 +08:00
parent a01d4f6cad
commit ad0d4ba38e
78 changed files with 3516 additions and 1870 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -137,6 +137,8 @@
"electricQuantity":"Electric Quantity",
"lockName":"Lock Name",
"lockGrouping":"Lock Grouping",
"selectGroup":"Selective grouping",
"createNewGroup":"Create a new group",
"adminOpenLockPassword":"Admin Open Lock Password",
"update":"Update",
"updateElectricQuantityTip":"The battery information can be updated remotely via the gateway or next to the lock via Bluetooth on the phone\n",
@ -170,7 +172,8 @@
"high":"High",
"higher":"Higher",
"burglarAlarmTip":"After opening, an alarm sound will be issued when the lock is picked",
"resetButtonTip":"After opening, you can re-add with APP by long pressing the reset key on the lock. After closing, the reset key is invalid, and the lock can be re-added only after being deleted by app",
"resetButtonTip1":"After opening, you can re-add with APP by long pressing the reset key on the lock.",
"resetButtonTip2":"After closing, the reset key is invalid, and the lock can be re-added only after being deleted by app",
"calibrationTime":"Calibration Time",
"setTheDSTMode":"Set The DST Mode",
"diagnoseTip":"Diagnosis is to read the configuration information inside the lock and upload it so that the staff can analyze the cause of the failure",
@ -201,6 +204,7 @@
"pushNotification":"Push Notification",
"lockUserManagement":"Lock User Management",
"aboutToExpire":"About to expire",
"changeName":"Change name",
"authorizedAdmin":"Authorized Admin",
"addAuthorizedAdmin":"Adding an Authorized Administrator",
"lockGroup":"Lock Group",

View File

@ -137,6 +137,8 @@
"electricQuantity":"electricQuantity",
"lockName":"lockName",
"lockGrouping":"lockGrouping",
"selectGroup":"selectGroup",
"createNewGroup":"createNewGroup",
"adminOpenLockPassword":"adminOpenLockPassword",
"update":"update",
"updateElectricQuantityTip":"updateElectricQuantityTip",
@ -170,7 +172,8 @@
"high":"high",
"higher":"higher",
"burglarAlarmTip":"burglarAlarmTip",
"resetButtonTip":"resetButtonTip",
"resetButtonTip1":"resetButtonTip1",
"resetButtonTip2":"resetButtonTip2",
"calibrationTime":"calibrationTime",
"setTheDSTMode":"setTheDSTMode",
"diagnoseTip":"diagnoseTip",
@ -243,6 +246,7 @@
"problemThree":"problemThree",
"pleaseEnterYourAnswer":"pleaseEnterYourAnswer",
"aboutToExpire":"aboutToExpire",
"changeName":"changeName",
"designation": "designation",
"state": "state",

View File

@ -137,6 +137,8 @@
"electricQuantity":"电量",
"lockName":"名称",
"lockGrouping":"锁分组",
"selectGroup":"选择分组",
"createNewGroup":"创建新分组",
"adminOpenLockPassword":"管理员开锁密码",
"update":"更新",
"updateElectricQuantityTip":"电量信息可以通过网关远程更新,或通过手机蓝牙在锁旁边更新",
@ -170,7 +172,8 @@
"higher":"较高",
"high":"高",
"burglarAlarmTip":"开启后,锁被撬动时,会发出报警声",
"resetButtonTip":"开启后可通过长按锁上的重置键来用APP重新添加\\n关闭后重置键无效锁要通过app删除后才能重新添加",
"resetButtonTip1":"开启后可通过长按锁上的重置键来用APP重新添加",
"resetButtonTip2":"关闭后重置键无效锁要通过app删除后才能重新添加",
"calibrationTime":"校准时间",
"setTheDSTMode":"夏令时模式设置",
"diagnoseTip":"诊断是读取锁内的配置信息并上传,以便工作人员分析故障的原因",
@ -243,6 +246,7 @@
"problemThree":"问题三",
"pleaseEnterYourAnswer":"请输入你的答案",
"aboutToExpire":"即将到期",
"changeName":"修改名称",
"designation": "名称",
"state": "状态",

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/minePersonInfoEmail_page.dart';
import 'package:star_lock/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart';
import 'package:star_lock/mine/mineSet/lockUserManage/ownedKeyList_page.dart';
import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_page.dart';
import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList_page.dart';
import 'package:star_lock/mine/mineSet/mineSet_page.dart';
@ -259,6 +259,7 @@ abstract class Routers {
static const selectGetewayListPage = '/selectGetewayListPage'; //
static const addAuthorizedAdministratorPage =
'/addAuthorizedAdministratorPage'; //
static const ownedKeyListPage = '/ownedKeyListPage'; //
static const starLockLoginPage = '/StarLockLoginPage'; //
static const starLockRegisterPage = '/StarLockRegisterPage'; //
@ -687,6 +688,8 @@ abstract class AppRouters {
page: () => const MinePersonInfoEditEmailPage()),
GetPage(
name: Routers.addAuthorizedAdministratorPage,
page: () => const AddAuthorizedAdministratorPage())
page: () => const AddAuthorizedAdministratorPage()),
GetPage(
name: Routers.ownedKeyListPage, page: () => const OwnedKeyListPage())
];
}

View File

@ -120,4 +120,5 @@ class AppColors {
static const placeholderTextColor = Color.fromRGBO(128, 128, 128, 1); //
static const greyBackgroundColor = Color.fromRGBO(240, 240, 240, 1); //
static const btnDisableColor = Color.fromRGBO(178, 178, 178, 1); //
static const toBeReceiveBgColor = Color.fromRGBO(246, 203, 203, 1); //
}

View File

@ -1,24 +1,23 @@
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/translations/trans_lib.dart';
mixin BaseWidget{
mixin BaseWidget {
double fs(double value) => value.sp;
double w(double width) => width.w;
double h(double height) => height.h;
initUI(Widget widget) => ScreenUtilInit(
// designSize: const Size(750, 1334),
designSize: const Size(375, 812),
minTextAdapt: true,
splitScreenMode: true,
builder: (context , child) {
return widget;
},
);
// designSize: const Size(750, 1334),
designSize: const Size(375, 812),
minTextAdapt: true,
splitScreenMode: true,
builder: (context, child) {
return widget;
},
);
///
Widget emptyView() {
@ -32,16 +31,17 @@ mixin BaseWidget{
children: <Widget>[
Image.asset(
'images/icon_unHaveData.png',
height: 200.w,
width: 200.w,
height: 120.w,
width: 120.w,
),
Padding(
padding: const EdgeInsets.only(top: 10),
child: Text(TranslationLoader.lanKeys!.noData!.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600)),
child: Text(TranslationLoader.lanKeys!.noData!.tr,
style: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor)),
)
],
),
);
}
}
}

View File

@ -9,18 +9,22 @@ import '../../../electronicKey/sendElectronicKey/sendElectronicKey/sendElectroni
import '../authorizedAdmin_page.dart';
class AuthorizedAdminManageTabbar extends StatefulWidget {
var initialIndex=1;
var initialIndex = 1;
AuthorizedAdminManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
AuthorizedAdminManageTabbar({Key? key, required this.initialIndex})
: super(key: key);
@override
State<AuthorizedAdminManageTabbar> createState() => _AuthorizedAdminManageTabbarState();
State<AuthorizedAdminManageTabbar> createState() =>
_AuthorizedAdminManageTabbarState();
}
class _AuthorizedAdminManageTabbarState extends State<AuthorizedAdminManageTabbar> with SingleTickerProviderStateMixin {
class _AuthorizedAdminManageTabbarState
extends State<AuthorizedAdminManageTabbar>
with SingleTickerProviderStateMixin {
late TabController _tabController;
final List<ItemView> _itemTabs= <ItemView>[
final List<ItemView> _itemTabs = <ItemView>[
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
];
@ -29,33 +33,44 @@ class _AuthorizedAdminManageTabbarState extends State<AuthorizedAdminManageTabba
void initState() {
// TODO: implement initState
super.initState();
_tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
_tabController = TabController(
vsync: this,
length: _itemTabs.length,
initialIndex: widget.initialIndex);
}
@override
Widget build(BuildContext context) {
return Expanded(
child: Column(
children: [
_tabBar(),
_pageWidget(),
],
)
);
children: [
_tabBar(),
_pageWidget(),
],
));
}
TabBar _tabBar(){
TabBar _tabBar() {
return TabBar(
controller: _tabController,
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
isScrollable: true,
indicatorColor: Colors.red,
unselectedLabelColor: Colors.black,
unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
automaticIndicatorColorAdjustment:true,
unselectedLabelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
),
automaticIndicatorColorAdjustment: true,
labelColor: AppColors.mainColor,
labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
labelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(
borderSide: BorderSide(color: AppColors.mainColor, width: 4.w),
strokeCap: StrokeCap.round,
width: 30.w),
);
}
@ -63,19 +78,26 @@ class _AuthorizedAdminManageTabbarState extends State<AuthorizedAdminManageTabba
return Tab(
// text: item.title,
child: Container(
width: 1.sw/4,
width: 1.sw / 4,
margin: EdgeInsets.all(10.w),
// color: Colors.red,
child: Text(item.title, textAlign: TextAlign.center,),
child: Text(
item.title,
textAlign: TextAlign.center,
),
),
);
}
Widget _pageWidget(){
Widget _pageWidget() {
return Expanded(
child: TabBarView(
controller: _tabController,
children: _itemTabs.map((ItemView item) => AuthorizedAdminPage(type: item.type,)).toList(),
children: _itemTabs
.map((ItemView item) => AuthorizedAdminPage(
type: item.type,
))
.toList(),
),
);
}

View File

@ -134,12 +134,17 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
child: Text(
tipStr,
textAlign: TextAlign.start,
style: TextStyle(
color: AppColors.darkGrayTextColor, fontSize: 20.sp),
)),
],
),
),
SizedBox(
height: 20.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.sender!.tr,
btnName: TranslationLoader.lanKeys!.send!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
@ -157,9 +162,8 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
},
child: Text(
TranslationLoader.lanKeys!.volumeAuthorizationLock!.tr,
style: TextStyle(
color: AppColors.mainColor,
fontWeight: FontWeight.w500),
style:
TextStyle(color: AppColors.mainColor, fontSize: 24.sp),
)),
],
),
@ -182,10 +186,9 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
height: 30.h,
),
Image.asset(
'images/main/icon_main_addLock.png',
'images/icon_send_success.png',
width: 150.w,
height: 150.w,
color: AppColors.mainColor,
),
SizedBox(
height: 20.h,
@ -246,7 +249,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
Widget getTFWidget(bool isHaveBtn, String tfStr) {
return Container(
height: 50.h,
width: 500.w,
width: 300.w,
child: Row(
children: [
Expanded(
@ -260,6 +263,8 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
//
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
hintText: tfStr,
hintStyle: TextStyle(
color: AppColors.placeholderTextColor, fontSize: 22.sp),
//线
border: InputBorder.none,
),
@ -270,12 +275,12 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
),
isHaveBtn
? Container(
width: 50.w,
height: 50.w,
width: 30.w,
height: 30.w,
decoration: const BoxDecoration(
color: Colors.white,
image: DecorationImage(
image: AssetImage('images/icon_lock.png'),
image: AssetImage('images/icon_addressBook.png'),
fit: BoxFit.fill),
),
alignment: Alignment.center,

View File

@ -25,74 +25,74 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.reset!.tr,
style: const TextStyle(color: Colors.white),
),
onPressed: () {},
),
],
// actionsList: [
// TextButton(
// child: Text(
// TranslationLoader.lanKeys!.reset!.tr,
// style: TextStyle(color: Colors.white, fontSize: 24.sp),
// ),
// onPressed: () {},
// ),
// ],
),
body: Column(
children: [
_searchWidget(),
Expanded(child: _buildMainUI()),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
}),
],
),
);
}
Widget _searchWidget() {
return Container(
height: 60.h,
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(5)),
child: TextField(
//
maxLines: 1,
// controller: _controller,
autofocus: false,
decoration: InputDecoration(
//
contentPadding: const EdgeInsets.only(
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
//线
border: InputBorder.none,
//
icon: Padding(
padding: EdgeInsets.only(
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
child: Image.asset(
'images/main/icon_main_search.png',
width: 40.w,
height: 40.w,
),
SizedBox(
height: 20.h,
),
),
GestureDetector(
child: Container(
height: 80.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'images/icon_btn_add.png',
width: 28.w,
height: 28.w,
),
SizedBox(
width: 6.w,
),
Text(
TranslationLoader.lanKeys!.addAuthorizedAdmin!.tr,
style: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
)
],
),
),
onTap: () {
Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
},
),
// SubmitBtn(
// btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
// onClick: () {
// Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
// }),
SizedBox(
height: 64.h,
)
],
),
);
}
Widget _buildMainUI() {
return ListView.builder(
itemCount: 10,
itemCount: 5,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_lock.png', "张三",
return _electronicKeyItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
});
@ -104,7 +104,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
return GestureDetector(
onTap: action,
child: Container(
height: 100.h,
height: 90.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
color: Colors.white,
@ -117,11 +117,11 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
),
Image.asset(
lockTypeIcon,
width: 50.w,
height: 50.w,
width: 60.w,
height: 60.w,
),
SizedBox(
width: 30.w,
width: 20.w,
),
Expanded(
child: Column(
@ -133,8 +133,23 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 32.sp, fontWeight: FontWeight.w500),
fontSize: 24.sp, color: AppColors.blackColor),
),
SizedBox(
width: 8.w,
),
Container(
padding: EdgeInsets.only(
left: 4.w, right: 4.w, top: 2.w, bottom: 2.w),
decoration: BoxDecoration(
color: AppColors.toBeReceiveBgColor,
borderRadius: BorderRadius.circular(5.0),
),
child: Text(
'待接收',
style: TextStyle(color: Colors.red, fontSize: 16.sp),
),
)
],
),
SizedBox(height: 5.h),
@ -145,7 +160,8 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
Text(
"2023.6.21 11.15 永久",
style: TextStyle(
fontSize: 28.sp, fontWeight: FontWeight.w500),
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),

View File

@ -8,18 +8,22 @@ import '../../../../../translations/trans_lib.dart';
import '../volumeAuthorizationLock_page.dart';
class VolumeAuthorizationLockManageTabbar extends StatefulWidget {
var initialIndex=1;
var initialIndex = 1;
VolumeAuthorizationLockManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
VolumeAuthorizationLockManageTabbar({Key? key, required this.initialIndex})
: super(key: key);
@override
State<VolumeAuthorizationLockManageTabbar> createState() => _VolumeAuthorizationLockManageTabbarState();
State<VolumeAuthorizationLockManageTabbar> createState() =>
_VolumeAuthorizationLockManageTabbarState();
}
class _VolumeAuthorizationLockManageTabbarState extends State<VolumeAuthorizationLockManageTabbar> with SingleTickerProviderStateMixin {
class _VolumeAuthorizationLockManageTabbarState
extends State<VolumeAuthorizationLockManageTabbar>
with SingleTickerProviderStateMixin {
late TabController _tabController;
final List<ItemView> _itemTabs= <ItemView>[
final List<ItemView> _itemTabs = <ItemView>[
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"),
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"),
];
@ -28,33 +32,44 @@ class _VolumeAuthorizationLockManageTabbarState extends State<VolumeAuthorizatio
void initState() {
// TODO: implement initState
super.initState();
_tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
_tabController = TabController(
vsync: this,
length: _itemTabs.length,
initialIndex: widget.initialIndex);
}
@override
Widget build(BuildContext context) {
return Expanded(
child: Column(
children: [
_tabBar(),
_pageWidget(),
],
)
);
children: [
_tabBar(),
_pageWidget(),
],
));
}
TabBar _tabBar(){
TabBar _tabBar() {
return TabBar(
controller: _tabController,
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
isScrollable: true,
indicatorColor: Colors.red,
unselectedLabelColor: Colors.black,
unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
automaticIndicatorColorAdjustment:true,
unselectedLabelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
),
automaticIndicatorColorAdjustment: true,
labelColor: AppColors.mainColor,
labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
labelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(
borderSide: BorderSide(color: AppColors.mainColor, width: 4.w),
strokeCap: StrokeCap.round,
width: 30.w),
);
}
@ -62,19 +77,26 @@ class _VolumeAuthorizationLockManageTabbarState extends State<VolumeAuthorizatio
return Tab(
// text: item.title,
child: Container(
width: 1.sw/4,
width: 1.sw / 4,
margin: EdgeInsets.all(10.w),
// color: Colors.red,
child: Text(item.title, textAlign: TextAlign.center,),
child: Text(
item.title,
textAlign: TextAlign.center,
),
),
);
}
Widget _pageWidget(){
Widget _pageWidget() {
return Expanded(
child: TabBarView(
controller: _tabController,
children: _itemTabs.map((ItemView item) => VolumeAuthorizationLockPage(type: item.type,)).toList(),
children: _itemTabs
.map((ItemView item) => VolumeAuthorizationLockPage(
type: item.type,
))
.toList(),
),
);
}

View File

@ -13,56 +13,92 @@ class CheckingInAddHolidaysPage extends StatefulWidget {
const CheckingInAddHolidaysPage({Key? key}) : super(key: key);
@override
State<CheckingInAddHolidaysPage> createState() => _CheckingInAddHolidaysPageState();
State<CheckingInAddHolidaysPage> createState() =>
_CheckingInAddHolidaysPageState();
}
class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.addedHoliday!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.addedHoliday!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("(${TranslationLoader.lanKeys!.mustFillIn!.tr})")),
CommonItem(leftTitel:TranslationLoader.lanKeys!.startDate!.tr, rightTitle:"(${TranslationLoader.lanKeys!.mustFillIn!.tr})", isHaveLine: true, isHaveDirection: false, action: () async {
await showDialog(context: context,
builder: (context) {
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
print("111111$dateTime");
Navigator.of(context).pop(true);
});
});
}),
CommonItem(leftTitel:TranslationLoader.lanKeys!.endDate!.tr, rightTitle:"(${TranslationLoader.lanKeys!.mustFillIn!.tr})", isHaveLine: true, isHaveDirection: false, action: () async {
await showDialog(context: context,
builder: (context) {
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
Navigator.of(context).pop(true);
});
});
}),
CommonItem(leftTitel:TranslationLoader.lanKeys!.coverDate!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: false, action: () async {
await showDialog(context: context,
builder: (context) {
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
Navigator.of(context).pop(true);
});
});
}),
SizedBox(height: 50.w,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: (){
}
CommonItem(
leftTitel: TranslationLoader.lanKeys!.name!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: getTFWidget(
"(${TranslationLoader.lanKeys!.mustFillIn!.tr})")),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.startDate!.tr,
rightTitle: "(${TranslationLoader.lanKeys!.mustFillIn!.tr})",
isHaveLine: true,
isHaveDirection: false,
action: () async {
await showDialog(
context: context,
builder: (context) {
return ShowCalendar(
datePickerMode: DatePickerMode.day,
seletAction: (dateTime) {
print("111111$dateTime");
Navigator.of(context).pop(true);
});
});
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.endDate!.tr,
rightTitle: "(${TranslationLoader.lanKeys!.mustFillIn!.tr})",
isHaveLine: true,
isHaveDirection: false,
action: () async {
await showDialog(
context: context,
builder: (context) {
return ShowCalendar(
datePickerMode: DatePickerMode.day,
seletAction: (dateTime) {
Navigator.of(context).pop(true);
});
});
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.coverDate!.tr,
rightTitle: "",
isHaveLine: false,
isHaveDirection: false,
action: () async {
await showDialog(
context: context,
builder: (context) {
return ShowCalendar(
datePickerMode: DatePickerMode.day,
seletAction: (dateTime) {
Navigator.of(context).pop(true);
});
});
}),
SizedBox(
height: 50.w,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
],
),
);
}
Widget getTFWidget(String tfStr){
Widget getTFWidget(String tfStr) {
return Container(
height: 50.h,
width: 300.w,
@ -75,35 +111,39 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
maxLines: 1,
// controller: _controller,
autofocus: false,
textAlign:TextAlign.end,
textAlign: TextAlign.end,
decoration: InputDecoration(
//
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
hintText: tfStr,
hintStyle: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
//线
border: InputBorder.none,
),
),
),
SizedBox(width: 10.w,),
],
),
);
}
Widget whetherTheEmployeeHasAKeyWidget(String title, Function action){
Widget whetherTheEmployeeHasAKeyWidget(String title, Function action) {
return GestureDetector(
onTap: (){
},
onTap: () {},
child: Row(
children: [
Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),
SizedBox(width: 5.w,),
Image.asset(
'images/icon_round_unSelet.png',
width: 40.w,
height: 40.w,
),
SizedBox(
width: 5.w,
),
Text(title),
],
),
);
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -22,20 +21,32 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(haveTitleWidget: true, titleWidget:titleWidget(), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
GestureDetector(
onTap: (){
Navigator.pushNamed(context, Routers.checkingInSetPage);
},
child: Image.asset('images/main/icon_lockDetail_checkIn_set.png', width: 50.w, height: 50.w,)
),
SizedBox(width: 30.w,),
],
appBar: TitleAppBar(
haveTitleWidget: true,
titleWidget: titleWidget(),
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
GestureDetector(
onTap: () {
Navigator.pushNamed(context, Routers.checkingInSetPage);
},
child: Image.asset(
'images/main/icon_lockDetail_checkIn_set.png',
width: 36.w,
height: 36.w,
)),
SizedBox(
width: 30.w,
),
],
),
body: Column(
children: [
topInfo(),
SizedBox(height: 10.h,),
SizedBox(
height: 10.h,
),
middleDayInfo(),
Expanded(child: bottomList())
],
@ -43,25 +54,35 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
);
}
Widget topInfo(){
Widget topInfo() {
return Container(
width: 1.sw,
// height: 370.h,
color: Colors.white,
child: Column(
children: [
SizedBox(height: 30.h,),
Image.asset('images/main/icon_checkInRankingListTop.png', width: 145.w, height: 145.w),
SizedBox(height: 10.h,),
Text(TranslationLoader.lanKeys!.noAttendanceRecord!.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500)),
SizedBox(height: 30.h,),
SizedBox(
height: 30.h,
),
Image.asset('images/main/icon_checkInRankingListTop.png',
width: 120.w, height: 120.w),
SizedBox(
height: 10.h,
),
Text(TranslationLoader.lanKeys!.noAttendanceRecord!.tr,
style: TextStyle(fontSize: 24.sp)),
SizedBox(
height: 30.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// SizedBox(width: 30.w,),
Row(
children: [
SizedBox(width: 40.w,),
SizedBox(
width: 40.w,
),
Container(
// width: 150.w,
height: 70.h,
@ -69,20 +90,29 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(TranslationLoader.lanKeys!.dailyCharts!.tr, style: TextStyle(color: AppColors.mainColor)),
Container(width: 20.w, height: 2.h, color: AppColors.mainColor)
Text(TranslationLoader.lanKeys!.dailyCharts!.tr,
style: TextStyle(
color: AppColors.mainColor, fontSize: 22.sp)),
Container(
width: 20.w,
height: 2.h,
color: AppColors.mainColor)
],
),
),
SizedBox(width: 40.w,),
Container(
SizedBox(
width: 40.w,
),
SizedBox(
// width: 100.w,
height: 70.h,
// color: Colors.red,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(TranslationLoader.lanKeys!.monthlyLeaderboard!.tr, style: const TextStyle(color: Colors.black)),
Text(TranslationLoader.lanKeys!.monthlyLeaderboard!.tr,
style: TextStyle(
color: Colors.black, fontSize: 22.sp)),
Container(width: 20.w, height: 2.h, color: Colors.black)
],
),
@ -91,19 +121,31 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
),
GestureDetector(
onTap: () async {
await showDialog(context: context,
builder: (context) {
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
Navigator.of(context).pop(true);
});
});
await showDialog(
context: context,
builder: (context) {
return ShowCalendar(
datePickerMode: DatePickerMode.day,
seletAction: (dateTime) {
Navigator.of(context).pop(true);
});
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("07-12", style: const TextStyle(color: Colors.black),),
Image.asset('images/icon_grayPullDown.png', width: 50.w, height: 30.w,),
SizedBox(width: 10.w,),
Text(
"07-12",
style: TextStyle(color: Colors.black, fontSize: 22.sp),
),
Image.asset(
'images/icon_grayPullDown.png',
width: 50.w,
height: 30.w,
),
SizedBox(
width: 10.w,
),
],
),
)
@ -115,56 +157,60 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
);
}
Widget middleDayInfo(){
Widget middleDayInfo() {
return Visibility(
visible: true,
child: Container(
height: 80.h,
color: Colors.white,
margin: EdgeInsets.only(left:15.h, right: 15.h, bottom: 10.h),
margin: EdgeInsets.only(left: 15.h, right: 15.h, bottom: 10.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
// width: 100.w,
// height: 80.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(height: 5.h,),
const Text("0", style: TextStyle(color: Colors.black)),
Text(TranslationLoader.lanKeys!.beLate!.tr, style: const TextStyle(color: Colors.black)),
SizedBox(height: 5.h,),
],
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
height: 5.h,
),
Text("0",
style: TextStyle(color: Colors.black, fontSize: 20.sp)),
Text(TranslationLoader.lanKeys!.beLate!.tr,
style: TextStyle(color: Colors.black, fontSize: 22.sp)),
SizedBox(
height: 5.h,
),
],
),
Container(
// width: 100.w,
// height: 80.h,
// color: Colors.red,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(height: 5.h,),
Text("0", style: TextStyle(color: Colors.black)),
Text(TranslationLoader.lanKeys!.leaveEarly!.tr, style: const TextStyle(color: Colors.black)),
SizedBox(height: 5.h,),
],
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
height: 5.h,
),
Text("0",
style: TextStyle(color: Colors.black, fontSize: 20.sp)),
Text(TranslationLoader.lanKeys!.leaveEarly!.tr,
style: TextStyle(color: Colors.black, fontSize: 22.sp)),
SizedBox(
height: 5.h,
),
],
),
Container(
// width: 100.w,
// height: 80.h,
// color: Colors.red,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(height: 5.h,),
Text("0", style: TextStyle(color: Colors.black)),
Text(TranslationLoader.lanKeys!.noCardPunched!.tr, style: const TextStyle(color: Colors.black)),
SizedBox(height: 5.h,),
],
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
height: 5.h,
),
Text("0",
style: TextStyle(color: Colors.black, fontSize: 20.sp)),
Text(TranslationLoader.lanKeys!.noCardPunched!.tr,
style: TextStyle(color: Colors.black, fontSize: 22.sp)),
SizedBox(
height: 5.h,
),
],
),
],
),
@ -172,76 +218,118 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
);
}
Widget bottomList(){
Widget bottomList() {
return ListView.separated(
itemCount:10,
itemBuilder: (c, index){
return _checkingInListItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
itemCount: 10,
itemBuilder: (c, index) {
return _checkingInListItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.checkingInDetailPage);
});
},
separatorBuilder: (context, index) {
return const Divider(height:1, color: Colors.grey);
return const Divider(height: 1, color: AppColors.greyLineColor);
},
);
}
Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle,
String beginTime, String endTime, Function() action) {
return GestureDetector(
onTap: action,
child: Container(
height: 80.h,
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
child: Row(
children: [
SizedBox(width: 30.w,),
Text("1", style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
SizedBox(width: 20.w,),
Container(
width: 60.h, height: 60.h,
decoration: BoxDecoration(
color: AppColors.mainColor,
border: Border.all(width: 1, color: AppColors.mainColor),
borderRadius: BorderRadius.circular(30.h),
),
padding: EdgeInsets.all(10.w),
child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 40.w, height: 40.w, color: Colors.white,)
SizedBox(
width: 30.w,
),
Text(
"1",
style: TextStyle(fontSize: 20.sp),
),
SizedBox(
width: 20.w,
),
Image.asset(
'images/controls_user.png',
width: 40.w,
height: 40.w,
),
// Container(
// width: 60.h,
// height: 60.h,
// decoration: BoxDecoration(
// color: AppColors.mainColor,
// border: Border.all(width: 1, color: AppColors.mainColor),
// borderRadius: BorderRadius.circular(30.h),
// ),
// padding: EdgeInsets.all(10.w),
// child: Image.asset(
// 'images/controls_user.png',
// width: 30.w,
// height: 30.w,
// color: Colors.white,
// )),
SizedBox(
width: 20.w,
),
SizedBox(width: 20.w,),
Expanded(
child: Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
child: Text(
lockTypeTitle,
style: TextStyle(fontSize: 24.sp),
),
),
SizedBox(width:20.h),
Image.asset("images/icon_right.png", width: 50.w, height: 50.w,),
SizedBox(width:20.h),
SizedBox(width: 20.h),
Image.asset(
"images/icon_right_grey.png",
width: 21.w,
height: 21.w,
),
SizedBox(width: 20.h),
],
),
),
);
}
Widget titleWidget(){
Widget titleWidget() {
return GestureDetector(
onTap: (){
onTap: () {
showListType();
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(TranslationLoader.lanKeys!.earlyArrivalList!.tr, style: const TextStyle(color: Colors.white),),
SizedBox(width: 5.w,),
Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,)
Text(
TranslationLoader.lanKeys!.earlyArrivalList!.tr,
style: TextStyle(color: Colors.white, fontSize: 26.sp),
),
SizedBox(
width: 5.w,
),
Image.asset(
'images/main/icon_lockDetail_checkIn_topTitle.png',
width: 22.w,
height: 16.w,
fit: BoxFit.fill,
)
],
),
);
}
void showListType(){
var list = [TranslationLoader.lanKeys!.earlyArrivalList!.tr, TranslationLoader.lanKeys!.lateList!.tr, TranslationLoader.lanKeys!.hardWorkingList!.tr];
void showListType() {
var list = [
TranslationLoader.lanKeys!.earlyArrivalList!.tr,
TranslationLoader.lanKeys!.lateList!.tr,
TranslationLoader.lanKeys!.hardWorkingList!.tr
];
ShowBottomSheetTool().showSingleRowPicker(
//
context,
@ -255,10 +343,6 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
//adapter: PickerAdapter(),
data: list,
//
clickCallBack: (int index, var str) {
}
);
clickCallBack: (int index, var str) {});
}
}

View File

@ -26,14 +26,14 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.checkingIn!.tr} ${TranslationLoader.lanKeys!.set!.tr}",
"${TranslationLoader.lanKeys!.checkingIn!.tr}${TranslationLoader.lanKeys!.set!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.company!.tr} ${TranslationLoader.lanKeys!.name!.tr}",
"${TranslationLoader.lanKeys!.company!.tr}${TranslationLoader.lanKeys!.name!.tr}",
rightTitle: "深圳市志超科技",
isHaveLine: true,
isHaveDirection: true,
@ -50,7 +50,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
}),
CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr}",
"${TranslationLoader.lanKeys!.work!.tr}${TranslationLoader.lanKeys!.time!.tr}",
rightTitle: "9:00 - 18:00",
isHaveLine: true,
isHaveDirection: true,
@ -59,7 +59,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
}),
CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}",
"${TranslationLoader.lanKeys!.workday!.tr}${TranslationLoader.lanKeys!.set!.tr}",
rightTitle: "1,2,3,4,5",
isHaveLine: true,
isHaveDirection: true,
@ -79,7 +79,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
),
SubmitBtn(
btnName:
"${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}",
"${TranslationLoader.lanKeys!.delete!.tr}${TranslationLoader.lanKeys!.company!.tr}",
borderRadius: 20.w,
fontSize: 32.sp,
isDelete: true,
@ -97,7 +97,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
builder: (BuildContext context) {
return ShowTFView(
title:
"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}",
"${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}",
tipTitle: "",
controller: _changeNameController);
});

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -22,47 +21,82 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle:"${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.staff!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.staff!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)),
CommonItem(leftTitel:TranslationLoader.lanKeys!.punchingMode!.tr, rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){
_showSeletClockInType();
}),
SizedBox(height: 10.h,),
CommonItem(leftTitel:TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Row(
children: [
whetherTheEmployeeHasAKeyWidget("", (){
CommonItem(
leftTitel: TranslationLoader.lanKeys!.name!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget:
getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.punchingMode!.tr,
rightTitle: "APP",
isHaveLine: false,
isHaveDirection: true,
action: () {
_showSeletClockInType();
}),
SizedBox(width: 30.w,),
whetherTheEmployeeHasAKeyWidget("", (){
}),
],
)),
SizedBox(
height: 10.h,
),
CommonItem(
leftTitel:
TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: Row(
children: [
whetherTheEmployeeHasAKeyWidget("", () {}),
SizedBox(
width: 30.w,
),
whetherTheEmployeeHasAKeyWidget("", () {}),
],
)),
Visibility(
visible:true,
child: CommonItem(leftTitel:TranslationLoader.lanKeys!.accountNumber!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)),
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget:
getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)),
),
Visibility(
visible:true,
child: CommonItem(leftTitel:TranslationLoader.lanKeys!.selectKey!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
_showSeletClockInType();
}),
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.selectKey!.tr,
rightTitle: "",
isHaveLine: false,
isHaveDirection: true,
action: () {
_showSeletClockInType();
}),
),
SizedBox(height: 50.w,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: (){
}
SizedBox(
height: 50.w,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
],
),
);
}
Widget getTFWidget(String tfStr){
Widget getTFWidget(String tfStr) {
return Container(
height: 50.h,
width: 300.w,
@ -75,26 +109,28 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
maxLines: 1,
// controller: _controller,
autofocus: false,
textAlign:TextAlign.end,
textAlign: TextAlign.end,
decoration: InputDecoration(
//
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
hintText: tfStr,
hintStyle: TextStyle(fontSize: 22.sp),
//线
border: InputBorder.none,
),
),
),
SizedBox(width: 10.w,),
],
),
);
}
void _showSeletClockInType(){
var list = ["15080825640",];
ShowBottomSheetTool().showSingleRowPicker(
//
void _showSeletClockInType() {
var list = [
"15080825640",
];
ShowBottomSheetTool().showSingleRowPicker(
//
context,
//
normalIndex: 0,
@ -106,25 +142,30 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
//adapter: PickerAdapter(),
data: list,
//
clickCallBack: (int index, var str) {
}
);
clickCallBack: (int index, var str) {});
}
Widget whetherTheEmployeeHasAKeyWidget(String title, Function action){
Widget whetherTheEmployeeHasAKeyWidget(String title, Function action) {
return GestureDetector(
onTap: (){
},
onTap: () {},
child: Row(
children: [
Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),
SizedBox(width: 5.w,),
Text(title),
],
Image.asset(
'images/icon_round_unSelet.png',
width: 26.w,
height: 26.w,
),
SizedBox(
width: 5.w,
),
Text(
title,
style: TextStyle(
fontSize: 22.sp,
),
),
],
),
);
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_pickers/pickers.dart';
import 'package:flutter_pickers/style/default_style.dart';
@ -19,7 +18,8 @@ class CheckingInSetHolidaysPage extends StatefulWidget {
const CheckingInSetHolidaysPage({Key? key}) : super(key: key);
@override
State<CheckingInSetHolidaysPage> createState() => _CheckingInSetHolidaysPageState();
State<CheckingInSetHolidaysPage> createState() =>
_CheckingInSetHolidaysPageState();
}
class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
@ -27,46 +27,63 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(haveTitleWidget: true, titleWidget:titleWidget(), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
GestureDetector(
onTap: (){
Navigator.pushNamed(context, Routers.checkingInAddHolidaysPage);
},
child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,)
),
SizedBox(width: 30.w,),
],
appBar: TitleAppBar(
haveTitleWidget: true,
titleWidget: titleWidget(),
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
GestureDetector(
onTap: () {
Navigator.pushNamed(
context, Routers.checkingInAddHolidaysPage);
},
child: Image.asset(
'images/icon_add_white.png',
width: 36.w,
height: 36.w,
)),
SizedBox(
width: 30.w,
),
],
),
body: ListView.builder(
itemCount:10,
itemBuilder: (c, index){
return _checkingInListItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
itemCount: 10,
itemBuilder: (c, index) {
return _checkingInListItem('images/icon_lock.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
}
)
);
}));
}
Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle,
String beginTime, String endTime, Function() action) {
return GestureDetector(
onTap: action,
child: Container(
height: 140.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
child: Row(
children: [
Container(
color: const Color(0xFFAFB5D7),
color: const Color(0xFFAFB5D7),
width: 100.w,
height: 140.h,
child: Center(child: Text("7\n${TranslationLoader.lanKeys!.month!.tr}", textAlign: TextAlign.center, style: TextStyle(fontSize: 32.sp, color: Colors.white),))
child: Center(
child: Text(
"7\n${TranslationLoader.lanKeys!.month!.tr}",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 28.sp, color: Colors.white),
))),
SizedBox(
width: 20.w,
),
SizedBox(width: 30.w,),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -76,55 +93,73 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600), ),
Text(
lockTypeTitle,
style: TextStyle(fontSize: 24.sp),
),
],
),
),
SizedBox(height:10.h),
SizedBox(height: 10.h),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("${TranslationLoader.lanKeys!.libertyDay!.tr}:2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
Text(
"${TranslationLoader.lanKeys!.libertyDay!.tr}:2023.6.21 11.15-2023.6.21 11.15",
style: TextStyle(fontSize: 20.sp),
),
],
),
),
SizedBox(height:5.h),
SizedBox(height: 5.h),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("${TranslationLoader.lanKeys!.coverDate!.tr}:2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
Text(
"${TranslationLoader.lanKeys!.coverDate!.tr}:2023.6.21 11.15",
style: TextStyle(fontSize: 20.sp),
),
],
),
),
],
),
),
SizedBox(width:20.h),
SizedBox(width: 20.h),
],
),
),
);
}
Widget titleWidget(){
Widget titleWidget() {
return GestureDetector(
onTap: (){
onTap: () {
showListType();
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("${DateTime.now().year}${TranslationLoader.lanKeys!.year!.tr}", style: const TextStyle(color: Colors.white),),
SizedBox(width: 5.w,),
Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,)
Text(
"${DateTime.now().year}${TranslationLoader.lanKeys!.year!.tr}",
style: TextStyle(color: Colors.white, fontSize: 26.sp),
),
SizedBox(
width: 5.w,
),
Image.asset(
'images/main/icon_lockDetail_checkIn_topTitle.png',
width: 22.w,
height: 16.w,
)
],
),
);
}
void showListType(){
void showListType() {
Pickers.showDatePicker(
context,
//
@ -133,20 +168,17 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
suffix: Suffix(years: ''),
//
pickerStyle: PickerStyle(
cancelButton:GestureDetector(
onTap: (){
},
cancelButton: GestureDetector(
onTap: () {},
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.only(left: 22, right: 12),
child: Text(TranslationLoader.lanKeys!.cancel!.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)),
child: Text(TranslationLoader.lanKeys!.cancel!.tr,
style: const TextStyle(color: Colors.black, fontSize: 16.0)),
),
),
commitButton: GestureDetector(
onTap: (){
},
onTap: () {},
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.only(left: 22, right: 12),
@ -183,5 +215,4 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
// }
// );
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -12,67 +11,99 @@ class CheckingInStaffManagePage extends StatefulWidget {
const CheckingInStaffManagePage({Key? key}) : super(key: key);
@override
State<CheckingInStaffManagePage> createState() => _CheckingInStaffManagePageState();
State<CheckingInStaffManagePage> createState() =>
_CheckingInStaffManagePageState();
}
class _CheckingInStaffManagePageState extends State<CheckingInStaffManagePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.staff!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
GestureDetector(
onTap: (){
Navigator.pushNamed(context, Routers.checkingInAddStaffPage);
},
child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,)
backgroundColor: AppColors.greyBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.staff!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
GestureDetector(
onTap: () {
Navigator.pushNamed(context, Routers.checkingInAddStaffPage);
},
child: Image.asset(
'images/icon_add_white.png',
width: 36.w,
height: 36.w,
)),
SizedBox(
width: 30.w,
),
],
),
SizedBox(width: 30.w,),
],
),
body: ListView.separated(
itemCount:10,
itemBuilder: (c, index){
return _checkingInStaffManageItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
},
separatorBuilder: (context, index) {
return const Divider(height:1, indent: 20, color: Colors.grey);
},
)
);
body: Container(
color: Colors.white,
child: ListView.separated(
itemCount: 10,
itemBuilder: (c, index) {
return _checkingInStaffManageItem('images/icon_lock.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
},
separatorBuilder: (context, index) {
return const Divider(
height: 1, indent: 20, color: AppColors.greyLineColor);
},
),
));
}
Widget _checkingInStaffManageItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
Widget _checkingInStaffManageItem(String lockTypeIcon, String lockTypeTitle,
String beginTime, String endTime, Function() action) {
return GestureDetector(
onTap: action,
child: Container(
height: 70.h,
margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.h, bottom: 10.h),
height: 60.h,
margin:
EdgeInsets.only(left: 10.w, right: 10.w, top: 10.h, bottom: 10.h),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(10.w),
// borderRadius: BorderRadius.circular(10.w),
// ),
child: Row(
children: [
SizedBox(width: 30.w,),
Container(
width: 60.h, height: 60.h,
decoration: BoxDecoration(
color: AppColors.mainColor,
border: Border.all(width: 1, color: AppColors.mainColor),
borderRadius: BorderRadius.circular(30.h),
),
padding: EdgeInsets.all(10.w),
child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 40.w, height: 40.w, color: Colors.white,)
SizedBox(
width: 30.w,
),
Image.asset(
'images/controls_user.png',
width: 40.w,
height: 40.w,
),
// Container(
// width: 60.h,
// height: 60.h,
// decoration: BoxDecoration(
// color: AppColors.mainColor,
// border: Border.all(width: 1, color: AppColors.mainColor),
// borderRadius: BorderRadius.circular(30.h),
// ),
// padding: EdgeInsets.all(10.w),
// child: Image.asset(
// 'images/controls_user.png',
// width: 40.w,
// height: 40.w,
// color: Colors.white,
// )),
SizedBox(
width: 30.w,
),
Text(
lockTypeTitle,
style: TextStyle(fontSize: 24.sp),
),
SizedBox(width: 30.w,),
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
],
),
),
);
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -13,70 +12,77 @@ class CheckingInSetWorkdaySet extends StatefulWidget {
const CheckingInSetWorkdaySet({Key? key}) : super(key: key);
@override
State<CheckingInSetWorkdaySet> createState() => _CheckingInSetWorkdaySetState();
State<CheckingInSetWorkdaySet> createState() =>
_CheckingInSetWorkdaySetState();
}
class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
body: ListView(
children: [
topBtnWidget(),
Visibility(
visible:false,
child: bottomCustomSeletBtn()
),
Visibility(
visible:true,
child: bottomOddOrEvenDaysOffSeletBtn()
),
SizedBox(height: 50.h,),
SubmitBtn(btnName:TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
),
],
),);
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView(
children: [
topBtnWidget(),
Visibility(visible: true, child: bottomCustomSeletBtn()),
Visibility(visible: false, child: bottomOddOrEvenDaysOffSeletBtn()),
SizedBox(
height: 50.h,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {}),
),
],
),
);
}
Widget topBtnWidget(){
Widget topBtnWidget() {
return Container(
width: 1.sw,
height: 120.h,
height: 100.h,
// color: Colors.red,
padding: EdgeInsets.all(10.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: (1.sw - 5.w*2)/2,
height: 120.h,
width: (1.sw - 5.w * 2) / 2,
height: 100.h,
color: AppColors.mainColor,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(child: Text(TranslationLoader.lanKeys!.custom!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white))),
Center(
child: Text(TranslationLoader.lanKeys!.custom!.tr,
style:
TextStyle(fontSize: 26.sp, color: Colors.white))),
],
),
),
// SizedBox(width: 10.w,),
Container(
width: (1.sw - 10*3)/2,
height: 120.h,
color: Colors.grey,
width: (1.sw - 10 * 3) / 2,
height: 100.h,
color: AppColors.btnDisableColor,
padding: EdgeInsets.all(10.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(child: Center(child: Text(TranslationLoader.lanKeys!.oddOrEvenDaysOff!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white), textAlign: TextAlign.center,))),
Expanded(
child: Center(
child: Text(
TranslationLoader.lanKeys!.oddOrEvenDaysOff!.tr,
style: TextStyle(fontSize: 26.sp, color: Colors.white),
textAlign: TextAlign.center,
))),
],
),
),
@ -85,86 +91,188 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
);
}
Widget bottomOddOrEvenDaysOffSeletBtn(){
Widget bottomOddOrEvenDaysOffSeletBtn() {
return Container(
padding: EdgeInsets.only(left:10.w, right: 10.w),
padding: EdgeInsets.only(left: 10.w, right: 10.w),
child: Column(
children: [
CommonItem(leftTitel:TranslationLoader.lanKeys!.thisWeek!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true),
CommonItem(leftTitel:TranslationLoader.lanKeys!.singleDayWeekend!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
CommonItem(
leftTitel: TranslationLoader.lanKeys!.thisWeek!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.singleDayWeekend!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.twoDaysOff!.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.twoDaysOff!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: false,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
],
),
);
}
Widget bottomCustomSeletBtn(){
Widget bottomCustomSeletBtn() {
return Container(
padding: EdgeInsets.only(left:10.w, right: 10.w),
padding: EdgeInsets.only(left: 10.w, right: 10.w),
child: Column(
children: [
CommonItem(leftTitel:TranslationLoader.lanKeys!.monday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
CommonItem(
leftTitel: TranslationLoader.lanKeys!.monday!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.tuesday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.tuesday!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.wednesday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.wednesday!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.thursday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.thursday!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.friday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.friday!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.saturday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.saturday!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.sunday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.sunday!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: false,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
],
),
);

View File

@ -28,7 +28,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
TextButton(
child: Text(
TranslationLoader.lanKeys!.reset!.tr,
style: const TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {},
),
@ -37,17 +37,46 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
body: Column(
children: [
_searchWidget(),
SizedBox(
height: 20.h,
),
Expanded(child: _buildMainUI()),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.sendKey!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
Navigator.pushNamed(
context, Routers.sendElectronicKeyManagePage);
}),
GestureDetector(
child: Container(
height: 80.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'images/icon_btn_add.png',
width: 28.w,
height: 28.w,
),
SizedBox(
width: 6.w,
),
Text(
TranslationLoader.lanKeys!.sendKey!.tr,
style: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
)
],
),
),
onTap: () {
Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage);
},
),
SizedBox(
height: 64.h,
)
],
),
);
@ -89,14 +118,21 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
}
Widget _buildMainUI() {
return ListView.builder(
itemCount: 10,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_lock.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
return ListView.separated(
itemCount: 5,
itemBuilder: (c, index) {
return _electronicKeyItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
},
);
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
@ -104,12 +140,8 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
return GestureDetector(
onTap: action,
child: Container(
height: 100.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
color: Colors.white,
height: 90.h,
child: Row(
children: [
SizedBox(
@ -117,36 +149,41 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
),
Image.asset(
lockTypeIcon,
width: 50.w,
height: 50.w,
width: 60.w,
height: 60.w,
),
SizedBox(
width: 30.w,
width: 20.w,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
// color: Colors.red,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 32.sp, fontWeight: FontWeight.w500),
),
SizedBox(width: 20.w),
Text(
"待接收",
style: TextStyle(
fontSize: 24.sp, fontWeight: FontWeight.w500),
),
],
),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 24.sp, color: AppColors.blackColor),
),
SizedBox(width: 10.w),
Image.asset(
'images/icon_electronicKey_admin.png',
width: 24.w,
height: 20.w,
),
Expanded(
child: SizedBox(
width: 20.w,
)),
Text(
"待接收",
style: TextStyle(fontSize: 18.sp, color: Colors.red),
),
],
),
SizedBox(width: 20.w),
SizedBox(height: 10.h),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
@ -154,7 +191,8 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
Text(
"2023.6.21 11.15-2023.6.21 11.15",
style: TextStyle(
fontSize: 28.sp, fontWeight: FontWeight.w500),
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),

View File

@ -41,27 +41,37 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
//
return sendElectronicKeySucceed();
// return Column(
// children: [
// keyInfoWidget(),
// keyTimeWidget(),
// keyRealNameWidget(),
// keyBottomWidget()
// ],
// );
// children: [
// keyInfoWidget(),
// keyTimeWidget(),
// remoteUnlockingWidget(),
// keyRealNameWidget(),
// keyBottomWidget()
// ],
// );
}
break;
case 1:
{
//
return Column(
children: [keyInfoWidget(), keyRealNameWidget(), keyBottomWidget()],
children: [
keyInfoWidget(),
remoteUnlockingWidget(),
keyRealNameWidget(),
keyBottomWidget()
],
);
}
case 2:
{
//
return Column(
children: [keyInfoWidget(), keyRealNameWidget(), keyBottomWidget()],
children: [
keyInfoWidget(),
remoteUnlockingWidget(),
keyRealNameWidget(),
keyBottomWidget()
],
);
}
case 3:
@ -70,8 +80,9 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
return Column(
children: [
keyInfoWidget(),
keyRealNameWidget(),
keyPeriodValidityWidget(),
remoteUnlockingWidget(),
keyRealNameWidget(),
keyBottomWidget()
],
);
@ -135,10 +146,10 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
CommonItem(
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
rightTitle: "",
isTipsImg: true,
isHaveRightWidget: true,
rightWidget: Container(width: 80.w, height: 50.h, child: _switch()),
rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()),
action: () {}),
Container(height: 10.h),
],
);
}
@ -155,6 +166,9 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
Navigator.pushNamed(
context, Routers.electronicKeyPeriodValidityPage);
}),
SizedBox(
height: 10.h,
)
],
);
}
@ -171,6 +185,8 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
child: Text(
TranslationLoader.lanKeys!.sendKeyBottomTip!.tr,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
)),
],
),
@ -189,9 +205,8 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
},
child: Text(
TranslationLoader.lanKeys!.sendGroupKey!.tr,
style: TextStyle(
color: AppColors.mainColor,
fontWeight: FontWeight.w500),
style:
TextStyle(color: AppColors.mainColor, fontSize: 22.sp),
)),
],
),
@ -214,10 +229,9 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
height: 30.h,
),
Image.asset(
'images/main/icon_main_addLock.png',
width: 150.w,
height: 150.w,
color: AppColors.mainColor,
'images/icon_send_success.png',
width: 100.w,
height: 100.w,
),
SizedBox(
height: 20.h,
@ -228,7 +242,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
Text(
"发送成功",
style: TextStyle(
fontSize: 32.sp,
fontSize: 26.sp,
color: Colors.black,
fontWeight: FontWeight.w500),
),
@ -240,36 +254,23 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
SizedBox(
height: 20.h,
),
SubmitBtn(
btnName: '完成',
fontSize: 28.sp,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
SubmitBtn(btnName: '完成', onClick: () {}),
SizedBox(
height: 10.h,
),
SubmitBtn(
btnName: '邮件通知',
fontSize: 28.sp,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
}),
SubmitBtn(
btnName: '微信通知',
fontSize: 28.sp,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
SubmitBtn(
btnName: '标记为已入住',
fontSize: 28.sp,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
SizedBox(
height: 10.h,
),
SubmitBtn(btnName: '微信通知', onClick: () {}),
SizedBox(
height: 10.h,
),
SubmitBtn(btnName: '标记为已入住', onClick: () {}),
],
);
}
@ -278,7 +279,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
Widget getTFWidget(bool isHaveBtn, String tfStr) {
return Container(
height: 50.h,
width: 500.w,
width: 320.w,
child: Row(
children: [
Expanded(
@ -292,6 +293,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
//
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
hintText: tfStr,
hintStyle: TextStyle(fontSize: 22.sp),
//线
border: InputBorder.none,
),
@ -302,12 +304,12 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
),
isHaveBtn
? Container(
width: 50.w,
height: 50.w,
width: 32.w,
height: 32.w,
decoration: const BoxDecoration(
color: Colors.white,
image: DecorationImage(
image: AssetImage('images/icon_lock.png'),
image: AssetImage('images/icon_addressBook.png'),
fit: BoxFit.fill),
),
alignment: Alignment.center,
@ -327,6 +329,21 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
);
}
//
Widget remoteUnlockingWidget() {
return Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
rightTitle: "",
isHaveRightWidget: true,
rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()),
action: () {}),
Container(height: 10.h),
],
);
}
CupertinoSwitch _switch() {
bool _isOn = false;
return CupertinoSwitch(

View File

@ -8,15 +8,19 @@ import '../../../../../translations/trans_lib.dart';
import '../sendElectronicKey/sendElectronicKey_page.dart';
class SendElectronicKeyManageTabbar extends StatefulWidget {
var initialIndex=1;
var initialIndex = 1;
SendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
SendElectronicKeyManageTabbar({Key? key, required this.initialIndex})
: super(key: key);
@override
State<SendElectronicKeyManageTabbar> createState() => _SendElectronicKeyManageTabbarState();
State<SendElectronicKeyManageTabbar> createState() =>
_SendElectronicKeyManageTabbarState();
}
class _SendElectronicKeyManageTabbarState extends State<SendElectronicKeyManageTabbar> with SingleTickerProviderStateMixin {
class _SendElectronicKeyManageTabbarState
extends State<SendElectronicKeyManageTabbar>
with SingleTickerProviderStateMixin {
late TabController _tabController;
final List<ItemView> _itemTabs = <ItemView>[
@ -30,33 +34,44 @@ class _SendElectronicKeyManageTabbarState extends State<SendElectronicKeyManageT
void initState() {
// TODO: implement initState
super.initState();
_tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
_tabController = TabController(
vsync: this,
length: _itemTabs.length,
initialIndex: widget.initialIndex);
}
@override
Widget build(BuildContext context) {
return Expanded(
child: Column(
children: [
_tabBar(),
_pageWidget(),
],
)
);
children: [
_tabBar(),
_pageWidget(),
],
));
}
TabBar _tabBar(){
TabBar _tabBar() {
return TabBar(
controller: _tabController,
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
isScrollable: true,
indicatorColor: Colors.red,
unselectedLabelColor: Colors.black,
unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
automaticIndicatorColorAdjustment:true,
unselectedLabelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
),
automaticIndicatorColorAdjustment: true,
labelColor: AppColors.mainColor,
labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
labelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(
borderSide: BorderSide(color: AppColors.mainColor, width: 4.w),
strokeCap: StrokeCap.round,
width: 30.w),
);
}
@ -64,19 +79,26 @@ class _SendElectronicKeyManageTabbarState extends State<SendElectronicKeyManageT
return Tab(
// text: item.title,
child: Container(
width: 1.sw/8,
width: 1.sw / 8,
margin: EdgeInsets.all(10.w),
// color: Colors.red,
child: Text(item.title, textAlign: TextAlign.center,),
child: Text(
item.title,
textAlign: TextAlign.center,
),
),
);
}
Widget _pageWidget(){
Widget _pageWidget() {
return Expanded(
child: TabBarView(
controller: _tabController,
children: _itemTabs.map((ItemView item) => SendElectronicKeyPage(type: item.type,)).toList(),
children: _itemTabs
.map((ItemView item) => SendElectronicKeyPage(
type: item.type,
))
.toList(),
),
);
}

View File

@ -10,7 +10,8 @@ class SendEmailNotificationPage extends StatefulWidget {
const SendEmailNotificationPage({Key? key}) : super(key: key);
@override
State<SendEmailNotificationPage> createState() => _SendEmailNotificationPageState();
State<SendEmailNotificationPage> createState() =>
_SendEmailNotificationPageState();
}
class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
@ -18,46 +19,71 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
@override
Widget build(BuildContext context) {
_emailController.text = "请爱的用户 \n\n你收到电子钥匙请试用APP(www.baidu.com)或小程序开锁 \n\n星锁";
_emailController.text =
"请爱的用户 \n\n你收到电子钥匙请试用APP(www.baidu.com)或小程序开锁 \n\n星锁";
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "邮件通知", haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle: "邮件通知",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
CommonItem(leftTitel:"接收者", rightTitle:"786612630@qq.com", isHaveLine: true,),
CommonItem(leftTitel:"类型", rightTitle:"个人邮件", isHaveDirection: true,),
CommonItem(
leftTitel: "接收者",
rightTitle: "786612630@qq.com",
isHaveLine: true,
),
CommonItem(
leftTitel: "类型",
rightTitle: "个人邮件",
isHaveDirection: true,
),
Container(height: 10.h),
CommonItem(leftTitel:"模板", rightTitle:"默认模板", isHaveDirection: true, isHaveLine:true),
CommonItem(
leftTitel: "模板",
rightTitle: "默认模板",
isHaveDirection: true,
isHaveLine: true),
Container(
height: 360.h,
color: Colors.white,
padding: EdgeInsets.only(left:20.w, right: 20.w, top: 20.h, bottom: 20.h),
child:TextField(
maxLines:8,
maxLength:1000,
padding: EdgeInsets.only(
left: 20.w, right: 20.w, top: 20.h, bottom: 20.h),
child: TextField(
maxLines: 8,
maxLength: 1000,
textAlign: TextAlign.start,
controller: _emailController,
style: TextStyle(color: Colors.black,fontSize: 28.sp,),
style: TextStyle(
color: Colors.black,
fontSize: 28.sp,
),
decoration: InputDecoration(
border: OutlineInputBorder(
///
borderRadius: BorderRadius.all(Radius.circular(20.h)),
///
borderSide: const BorderSide(
///
color: Color(0xffB2B2B2),
///
width: 0.5,
),
),
///
focusedBorder: OutlineInputBorder(
///
borderRadius: BorderRadius.all(Radius.circular(20.h)),
///
borderSide: const BorderSide(
///
color: Color(0xffB2B2B2),
///
width: 1,
),
@ -66,9 +92,13 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
),
),
Container(height: 40.h),
SubmitBtn(btnName: '发送', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
}),
SubmitBtn(
btnName: '发送',
fontSize: 28.sp,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
],
),
);

View File

@ -79,13 +79,16 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
visible: true,
child: Container(
color: Colors.white,
padding: EdgeInsets.all(30.w),
padding: EdgeInsets.only(
left: 30.w, top: 10.w, right: 30.w, bottom: 10.w),
child: Column(
children: [
Row(
children: [
Text(
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)"),
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)",
style: TextStyle(fontSize: 24.sp),
),
],
),
TextField(
@ -99,7 +102,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
const EdgeInsets.only(top: 12.0, bottom: 8.0),
hintText:
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)",
hintStyle: TextStyle(fontSize: 30.sp),
hintStyle: TextStyle(fontSize: 24.sp),
//线
border: InputBorder.none,
),
@ -118,7 +121,9 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
children: [
Expanded(
child: Text(
TranslationLoader.lanKeys!.automaticBlockingTip!.tr)),
TranslationLoader.lanKeys!.automaticBlockingTip!.tr,
style: TextStyle(fontSize: 20.sp),
)),
],
),
)

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -12,7 +11,8 @@ class AdminOpenLockPasswordPage extends StatefulWidget {
const AdminOpenLockPasswordPage({Key? key}) : super(key: key);
@override
State<AdminOpenLockPasswordPage> createState() => _AdminOpenLockPasswordPageState();
State<AdminOpenLockPasswordPage> createState() =>
_AdminOpenLockPasswordPageState();
}
class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
@ -20,12 +20,18 @@ class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Column(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.adminOpenLockPassword!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"189934", isHaveLine: false, isHaveDirection: true, action: (){
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.password!.tr,
rightTitle: "189934",
isHaveLine: false,
isHaveDirection: true,
action: () {}),
Container(
margin: EdgeInsets.all(30.w),
child: Column(
@ -33,27 +39,35 @@ class _AdminOpenLockPasswordPageState extends State<AdminOpenLockPasswordPage> {
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.adminOpenLockPasswordTip!.tr)),
Expanded(
child: Text(
TranslationLoader.lanKeys!.adminOpenLockPasswordTip!.tr,
style: TextStyle(fontSize: 20.sp),
)),
],
),
SizedBox(height:10.h,),
SizedBox(
height: 10.h,
),
GestureDetector(
onTap: (){
},
onTap: () {},
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.updateLockAdminPassword!.tr, style: TextStyle(color: AppColors.mainColor),)),
Expanded(
child: Text(
TranslationLoader
.lanKeys!.updateLockAdminPassword!.tr,
style: TextStyle(
color: AppColors.mainColor, fontSize: 20.sp),
)),
],
),
),
],
),
),
],
)
);
));
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -22,34 +21,77 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Column(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.basicInformation!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
Expanded(
child: ListView(
children: [
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockNumber!.tr, rightTitle:"MCBN0c_8f3106", allHeight:70.h, isHaveLine: false),
CommonItem(leftTitel:"MAC/ID", rightTitle:"53:66:9F:06:31:8F/9418481", allHeight:70.h, isHaveLine: false),
SizedBox(height: 10.h,),
CommonItem(leftTitel:TranslationLoader.lanKeys!.electricQuantity!.tr, rightTitle:"100%", isHaveLine: true, isHaveDirection: true, action: (){
Navigator.pushNamed(context, Routers.uploadElectricQuantityPage);
}),
CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"永久", allHeight:70.h, isHaveLine: false),
SizedBox(height: 10.h,),
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockName!.tr, rightTitle:"MCBN0c_8f3106", isHaveLine: true, isHaveDirection: true, action: (){
Navigator.pushNamed(context, Routers.editLockNamePage);
}),
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockGrouping!.tr, rightTitle:"202307", isHaveLine: true, isHaveDirection: true, action: (){
Navigator.pushNamed(context, Routers.lockSeletGroupingPage);
}),
CommonItem(leftTitel:TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
Navigator.pushNamed(context, Routers.adminOpenLockPasswordPage);
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.lockNumber!.tr,
rightTitle: "MCBN0c_8f3106",
allHeight: 70.h,
isHaveLine: false),
CommonItem(
leftTitel: "MAC/ID",
rightTitle: "53:66:9F:06:31:8F/9418481",
allHeight: 70.h,
isHaveLine: false),
SizedBox(
height: 10.h,
),
CommonItem(
leftTitel:
TranslationLoader.lanKeys!.electricQuantity!.tr,
rightTitle: "100%",
isHaveLine: true,
isHaveDirection: true,
action: () {
Navigator.pushNamed(
context, Routers.uploadElectricQuantityPage);
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
rightTitle: "永久",
allHeight: 70.h,
isHaveLine: false),
SizedBox(
height: 10.h,
),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.lockName!.tr,
rightTitle: "MCBN0c_8f3106",
isHaveLine: true,
isHaveDirection: true,
action: () {
Navigator.pushNamed(context, Routers.editLockNamePage);
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.lockGrouping!.tr,
rightTitle: "202307",
isHaveLine: true,
isHaveDirection: true,
action: () {
Navigator.pushNamed(
context, Routers.lockSeletGroupingPage);
}),
CommonItem(
leftTitel:
TranslationLoader.lanKeys!.adminOpenLockPassword!.tr,
rightTitle: "",
isHaveLine: false,
isHaveDirection: true,
action: () {
Navigator.pushNamed(
context, Routers.adminOpenLockPasswordPage);
}),
],
),
),
],
)
);
));
}
}

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../../../app_settings/app_colors.dart';
@ -16,7 +16,8 @@ class EditLockNamePage extends StatefulWidget {
}
class _EditLockNamePageState extends State<EditLockNamePage> {
final TextEditingController _changeLockNameController = TextEditingController();
final TextEditingController _changeLockNameController =
TextEditingController();
@override
void initState() {
@ -28,18 +29,29 @@ class _EditLockNamePageState extends State<EditLockNamePage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
TextButton(
child: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.white),),
onPressed: (){
},),
],),
body:Container(
child: LoginInput(controller: _changeLockNameController, leftWidget:const SizedBox(), hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
)
);
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeName!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.sure!.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {},
),
],
),
body: Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: LoginInput(
controller: _changeLockNameController,
leftWidget: const SizedBox(),
hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
));
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -21,33 +20,51 @@ class _LockSeletGroupingPageState extends State<LockSeletGroupingPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Column(
children: [
Expanded(child: _buildMainUI()),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: (){
// Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage);
}
),
],
),
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.selectGroup!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
Expanded(child: _buildMainUI()),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.createNewGroup!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
// Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage);
}),
SizedBox(
height: 40.h,
)
],
),
);
}
Widget _buildMainUI(){
Widget _buildMainUI() {
return ListView.builder(
itemCount:2,
itemBuilder: (c, index){
return CommonItem(leftTitel:"202307", rightTitle:"", allHeight: 70.h, isHaveLine: true, isHaveDirection:false, isHaveRightWidget: true, rightWidget: Image(image: const AssetImage("images/icon_item_checked.png"),width:30.w,height:30.w, fit: BoxFit.contain,), action: (){
// logic.changeLanguage(e);
});
}
);
itemCount: 2,
itemBuilder: (c, index) {
return CommonItem(
leftTitel: "202307",
rightTitle: "",
allHeight: 70.h,
isHaveLine: true,
isHaveDirection: false,
isHaveRightWidget: true,
rightWidget: Image(
image: const AssetImage("images/icon_item_checked.png"),
width: 30.w,
height: 30.w,
fit: BoxFit.contain,
),
action: () {
// logic.changeLanguage(e);
});
});
}
}

View File

@ -11,45 +11,59 @@ class UploadElectricQuantityPage extends StatefulWidget {
const UploadElectricQuantityPage({Key? key}) : super(key: key);
@override
State<UploadElectricQuantityPage> createState() => _UploadElectricQuantityPageState();
State<UploadElectricQuantityPage> createState() =>
_UploadElectricQuantityPageState();
}
class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage> {
class _UploadElectricQuantityPageState
extends State<UploadElectricQuantityPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.electricQuantity!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Container(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.electricQuantity!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.updateElectricQuantityTip!.tr)),
Expanded(
child: Text(
TranslationLoader.lanKeys!.updateElectricQuantityTip!.tr,
style: TextStyle(fontSize: 20.sp),
)),
],
),
SizedBox(height: 20.h,),
SizedBox(
height: 40.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text("${TranslationLoader.lanKeys!.electricQuantity!.tr} 100%")),
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.electricQuantity!.tr} 100%",
style: TextStyle(fontSize: 20.sp),
)),
],
),
SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.update!.tr,
SizedBox(
height: 30.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.update!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
),
onClick: () {}),
],
),
)
);
));
}
}

View File

@ -19,37 +19,50 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Container(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.burglarAlarmTip!.tr)),
Expanded(
child: Text(
TranslationLoader.lanKeys!.burglarAlarmTip!.tr,
style: TextStyle(fontSize: 20.sp),
)),
],
),
SizedBox(height: 20.h,),
SizedBox(
height: 20.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: const TextStyle(fontWeight: FontWeight.w600),)),
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}",
style:
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w600),
)),
],
),
SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
SizedBox(
height: 40.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.closed!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
),
onClick: () {}),
],
),
)
);
));
}
}

View File

@ -19,30 +19,37 @@ class _DiagnosePageState extends State<DiagnosePage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.diagnose!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Container(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.diagnose!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.diagnoseTip!.tr)),
Expanded(
child: Text(
TranslationLoader.lanKeys!.diagnoseTip!.tr,
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
)),
],
),
SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.uploading!.tr,
SizedBox(
height: 40.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.uploading!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
),
onClick: () {}),
],
),
)
);
));
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -17,15 +16,20 @@ class AddDoorMagneticPage extends StatefulWidget {
}
class _AddDoorMagneticPageState extends State<AddDoorMagneticPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.doorMagnetic!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView(
children: [
SizedBox(height: 100.h,),
SizedBox(
height: 100.h,
),
Container(
// color: Colors.red,
margin: EdgeInsets.only(left: 20.w, right: 20.w),
@ -33,41 +37,54 @@ class _AddDoorMagneticPageState extends State<AddDoorMagneticPage> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.pressAndHoldTheResetButtonTwoSeconds!.tr, textAlign:TextAlign.center, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)),
Expanded(
child: Text(
TranslationLoader
.lanKeys!.pressAndHoldTheResetButtonTwoSeconds!.tr,
textAlign: TextAlign.center,
style:
TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
)),
],
),
),
SizedBox(height: 90.h,),
Image.asset('images/main/icon_addDoorMagnetic_tip.png', width: 300.w, height: 300.w,),
SizedBox(height: 90.h,),
SizedBox(
height: 90.h,
),
Image.asset(
'images/main/icon_addDoorMagnetic_tip.png',
width: 260.w,
height: 260.w,
),
SizedBox(
height: 90.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
Text(
TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr,
style: TextStyle(fontSize: 22.sp),
),
],
),
SizedBox(height: 90.h,),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.next!.tr,
borderRadius: 10.w,
fontSize: 28.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
onClick: (){
Navigator.pushNamed(context, Routers.nearbyDoorMagneticPage);
}
SizedBox(
height: 90.h,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.next!.tr,
onClick: () {
Navigator.pushNamed(context, Routers.nearbyDoorMagneticPage);
}),
)
],
),
);
}
void onShow() {}
void onShow(){
}
void onHide(){
}
void onHide() {}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -22,7 +21,10 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.doorMagnetic!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.doorMagnetic!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
Container(
@ -31,26 +33,34 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.doorMagneticListTopTip!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)),
Expanded(
child: Text(
TranslationLoader.lanKeys!.doorMagneticListTopTip!.tr,
style:
TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w500),
)),
],
),
),
Expanded(child: _buildMainUI()),
SubmitBtn(
btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.tr}",
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: (){
Navigator.pushNamed(context, Routers.addDoorMagneticPage);
}
Container(
margin: EdgeInsets.only(left: 200.w, right: 200.w),
child: SubmitBtn(
btnName:
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.doorMagnetic!.tr}",
onClick: () {
Navigator.pushNamed(context, Routers.addDoorMagneticPage);
}),
),
SizedBox(
height: 500.h,
)
],
),
);
}
Widget _buildMainUI(){
Widget _buildMainUI() {
// return ListView.builder(
// itemCount:10,
// itemBuilder: (c, index){
@ -62,21 +72,30 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
return emptyView();
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
String beginTime, String endTime, Function() action) {
return GestureDetector(
onTap: action,
child: Container(
height: 100.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
child: Row(
children: [
SizedBox(width: 30.w,),
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
SizedBox(width: 30.w,),
SizedBox(
width: 30.w,
),
Image.asset(
lockTypeIcon,
width: 50.w,
height: 50.w,
),
SizedBox(
width: 30.w,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -86,26 +105,34 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 32.sp, fontWeight: FontWeight.w500),
),
// SizedBox(width:20.w),
// Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
],
),
),
SizedBox(width:20.w),
SizedBox(width: 20.w),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
Text(
"2023.6.21 11.15",
style: TextStyle(
fontSize: 28.sp, fontWeight: FontWeight.w500),
),
],
),
),
SizedBox(width:20.h),
SizedBox(width: 20.h),
],
),
),
SizedBox(width:20.h),
SizedBox(width: 20.h),
],
),
),

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -19,19 +18,22 @@ class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView.builder(
itemCount:20,
itemBuilder: (c, index){
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){
itemCount: 20,
itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () {
// Navigator.pushNamed(context, Routers.saveLockPage);
});
}
),
}),
);
}
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
Widget nearbyLockItem(
String lockTypeIcon, String lockTypeTitle, Function() action) {
return GestureDetector(
onTap: action,
child: Column(
@ -44,31 +46,41 @@ class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
children: [
// SizedBox(width:20.w),
// Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
SizedBox(width:20.w),
SizedBox(width: 20.w),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 24.sp,
),
),
],
),
),
SizedBox(width:20.w),
Image.asset('images/main/icon_main_addLock.png', width: 50.w, height: 50.w,),
SizedBox(width:30.w),
SizedBox(width: 20.w),
Image.asset(
'images/main/icon_main_addLock.png',
width: 36.w,
height: 36.w,
),
SizedBox(width: 30.w),
],
),
),
Container(height: 0.5.h, color: Colors.grey,)
Container(
height: 0.5.h,
color: Colors.grey,
)
],
),
);
}
void onShow(){
}
void onShow() {}
void onHide(){
}
void onHide() {}
}

View File

@ -19,47 +19,57 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Text(TranslationLoader
.lanKeys!.importOtherLockDataTip!.tr)),
],
),
SizedBox(
height: 20.h,
),
_searchWidget(),
SizedBox(
height: 10.h,
),
Expanded(child: _buildMainUI()),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {}),
],
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
IconButton(
icon: Image.asset(
'images/icon_bar_tips.png',
width: 32.w,
height: 32.w,
),
onPressed: () {},
),
));
],
),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(top: 30.w, left: 20.w, right: 20.w),
child: Text(
TranslationLoader.lanKeys!.importOtherLockDataTip!.tr,
style: TextStyle(fontSize: 22.sp),
)),
_searchWidget(),
SizedBox(
height: 10.h,
),
Expanded(child: _buildMainUI()),
SizedBox(
height: 20.h,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {}),
),
SizedBox(
height: 40.h,
)
],
),
);
}
Widget _searchWidget() {
return Container(
height: 60.h,
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
margin: EdgeInsets.only(top: 30.w, left: 20.w, right: 10.w),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(5)),
child: TextField(
@ -92,14 +102,21 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
}
Widget _buildMainUI() {
return ListView.builder(
itemCount: 20,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_lock.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
return ListView.separated(
itemCount: 2,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_round_unSelet.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
},
);
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
@ -107,8 +124,8 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
return GestureDetector(
onTap: action,
child: Container(
height: 100.h,
margin: EdgeInsets.only(top: 15.h),
height: 60.h,
// margin: EdgeInsets.only(top: 15.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
@ -120,12 +137,20 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
),
Image.asset(
lockTypeIcon,
width: 50.w,
height: 50.w,
width: 30.w,
height: 30.w,
),
SizedBox(
width: 30.w,
width: 10.w,
),
Text(
'test锁',
style: TextStyle(
color: AppColors.blackColor,
fontSize: 22.sp,
fontWeight: FontWeight.w600),
),
/*
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -166,6 +191,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
],
),
),
*/
SizedBox(width: 20.h),
],
),

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -20,37 +19,58 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockEscalation!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Container(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.lockEscalation!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
SizedBox(height: 60.h,),
SizedBox(
height: 60.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset('images/main/icon_main_lockSet_lockEscalation.png', width: 40.w, height: 40.w,),
SizedBox(width: 10.w,),
Text(TranslationLoader.lanKeys!.haveNewVersion!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600),)
Image.asset(
'images/main/icon_main_lockSet_lockEscalation.png',
width: 36.w,
height: 36.w,
),
SizedBox(
width: 10.w,
),
Text(
TranslationLoader.lanKeys!.haveNewVersion!.tr,
style:
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
)
],
),
SizedBox(height: 30.h,),
Text("${TranslationLoader.lanKeys!.currentVersion!.tr}1.0.0"),
SizedBox(height: 10.h,),
Text("${TranslationLoader.lanKeys!.newVersion!.tr}1.0.1", style: TextStyle(color: AppColors.mainColor),),
SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.upgrade!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
SizedBox(
height: 30.h,
),
Text(
"${TranslationLoader.lanKeys!.currentVersion!.tr}1.0.0",
style: TextStyle(
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
),
SizedBox(
height: 10.h,
),
Text(
"${TranslationLoader.lanKeys!.newVersion!.tr}1.0.1",
style: TextStyle(color: AppColors.mainColor, fontSize: 18.sp),
),
SizedBox(
height: 40.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.upgrade!.tr,
onClick: () {}),
],
),
)
);
));
}
}

View File

@ -38,13 +38,17 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
height: 10.h,
),
Container(
padding: EdgeInsets.all(30.w),
color: Colors.white,
padding: EdgeInsets.only(
left: 30.w, right: 30.w, top: 20.w, bottom: 20.w),
// color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Text(TranslationLoader.lanKeys!.lockSoundTip!.tr)),
child: Text(
TranslationLoader.lanKeys!.lockSoundTip!.tr,
style: TextStyle(fontSize: 20.sp),
)),
],
),
),
@ -73,8 +77,8 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 40.w,
height: 40.w,
width: 30.w,
height: 30.w,
),
],
),
@ -90,8 +94,8 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 40.w,
height: 40.w,
width: 30.w,
height: 30.w,
),
],
),
@ -107,8 +111,8 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 40.w,
height: 40.w,
width: 30.w,
height: 30.w,
),
],
),
@ -124,8 +128,8 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 40.w,
height: 40.w,
width: 30.w,
height: 30.w,
),
],
),
@ -141,8 +145,8 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 40.w,
height: 40.w,
width: 30.w,
height: 30.w,
),
],
),
@ -150,14 +154,14 @@ class _LockSoundSetPageState extends State<LockSoundSetPage> {
],
),
)),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
// Navigator.pushNamed(context, Routers.nearbyLockPage);
}),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 30.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
onClick: () {
// Navigator.pushNamed(context, Routers.nearbyLockPage);
}),
),
],
));
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -16,45 +15,51 @@ class LockTimePage extends StatefulWidget {
}
class _LockTimePageState extends State<LockTimePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockTime!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Container(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.lockTime!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
SizedBox(height: 50.h,),
SizedBox(
height: 50.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("2023.07.10 11.47.33", style: TextStyle(fontSize: 36.sp)),
Text("2023.07.10 11.47.33",
style: TextStyle(
fontSize: 26.sp, color: AppColors.blackColor)),
],
),
SizedBox(height: 60.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.calibrationTime!.tr,
SizedBox(
height: 60.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.calibrationTime!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
onClick: () {}),
SizedBox(
height: 40.h,
),
SizedBox(height: 40.h,),
GestureDetector(
onTap: (){
},
onTap: () {},
child: Container(
child: Text(TranslationLoader.lanKeys!.setTheDSTMode!.tr, style: TextStyle(fontSize: 30.sp, color: AppColors.mainColor))
),
child: Text(TranslationLoader.lanKeys!.setTheDSTMode!.tr,
style: TextStyle(
fontSize: 24.sp, color: AppColors.mainColor))),
),
],
),
)
);
));
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -21,37 +20,59 @@ class _MarkedHouseStatePageState extends State<MarkedHouseStatePage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.markedHouseState!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Container(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.markedHouseState!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
child: Column(
children: [
CommonItem(leftTitel:TranslationLoader.lanKeys!.leisure!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
CommonItem(
leftTitel: TranslationLoader.lanKeys!.leisure!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.checkedIn!.tr,
rightTitle: "",
isHaveLine: false,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
SizedBox(
height: 60.h,
),
SizedBox(height: 60.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
SubmitBtn(
btnName: TranslationLoader.lanKeys!.sure!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
),
onClick: () {}),
],
),
)
);
));
}
}

View File

@ -38,14 +38,17 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
height: 10.h,
),
Container(
padding: EdgeInsets.all(30.w),
padding: EdgeInsets.only(
left: 30.w, right: 30.w, top: 20.w, bottom: 20.w),
color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Text(
TranslationLoader.lanKeys!.normallyOpenModeTip!.tr)),
TranslationLoader.lanKeys!.normallyOpenModeTip!.tr,
style: TextStyle(fontSize: 20.sp),
)),
],
),
),
@ -66,14 +69,14 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
],
),
)),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
// Navigator.pushNamed(context, Routers.nearbyLockPage);
}),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 30.h),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
onClick: () {
// Navigator.pushNamed(context, Routers.nearbyLockPage);
}),
),
],
));
}
@ -89,11 +92,11 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
Container(
height: 60.h,
// color: Colors.red,
padding: EdgeInsets.only(left: 20.h, top: 15.h),
padding: EdgeInsets.only(left: 30.w, top: 15.h),
child: Text(
"${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.date!.tr}",
"${TranslationLoader.lanKeys!.normallyOpen!.tr}${TranslationLoader.lanKeys!.date!.tr}",
style:
TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))),
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600))),
Container(
height: 90.h,
padding: EdgeInsets.only(left: 10.w, right: 10.w),
@ -141,15 +144,19 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
return GestureDetector(
onTap: () {},
child: Container(
width: 70.h,
height: 70.h,
margin: EdgeInsets.all(10.h),
width: 40.w,
height: 40.w,
margin: EdgeInsets.all(10.w),
decoration: BoxDecoration(
// color: Colors.blue,
border: Border.all(width: 1, color: Colors.grey),
borderRadius: BorderRadius.circular(60.w),
border: Border.all(width: 1, color: AppColors.btnDisableColor),
borderRadius: BorderRadius.circular(30.w),
),
child: Center(child: Text(dateStr)),
child: Center(
child: Text(
dateStr,
style: TextStyle(fontSize: 20.sp, color: AppColors.darkGrayTextColor),
)),
),
);
}
@ -163,7 +170,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
),
CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.time!.tr}",
"${TranslationLoader.lanKeys!.normallyOpen!.tr}${TranslationLoader.lanKeys!.time!.tr}",
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
@ -171,14 +178,17 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
onTap: () {},
child: Row(
children: [
Text(TranslationLoader.lanKeys!.allDay!.tr),
Text(
TranslationLoader.lanKeys!.allDay!.tr,
style: TextStyle(fontSize: 22.sp),
),
SizedBox(
width: 5.w,
),
Image.asset(
'images/icon_round_unSelet.png',
width: 40.w,
height: 40.w,
width: 30.w,
height: 30.w,
),
],
),
@ -191,14 +201,14 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
children: [
CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.begin!.tr} ${TranslationLoader.lanKeys!.time!.tr}",
"${TranslationLoader.lanKeys!.begin!.tr}${TranslationLoader.lanKeys!.time!.tr}",
rightTitle: "",
isHaveDirection: true,
isHaveLine: true,
action: () {}),
CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.end!.tr} ${TranslationLoader.lanKeys!.time!.tr}",
"${TranslationLoader.lanKeys!.end!.tr}${TranslationLoader.lanKeys!.time!.tr}",
rightTitle: "",
isHaveDirection: true,
action: () {}),

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -20,37 +19,47 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.remoteUnlocking!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Container(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.remoteUnlockingPageTip!.tr)),
Expanded(
child: Text(
TranslationLoader.lanKeys!.remoteUnlockingPageTip!.tr,
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
)),
],
),
SizedBox(height: 20.h,),
SizedBox(
height: 20.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}",
style:
TextStyle(fontWeight: FontWeight.w600, fontSize: 22.sp),
)),
],
),
SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
SizedBox(
height: 40.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.closed!.tr,
onClick: () {}),
],
),
)
);
));
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -20,38 +19,63 @@ class _ResetButtonPageState extends State<ResetButtonPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.resetButton!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body:Container(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetButton!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text(TranslationLoader.lanKeys!.resetButtonTip!.tr)),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationLoader.lanKeys!.resetButtonTip1!.tr,
style: TextStyle(fontSize: 20.sp),
),
SizedBox(
height: 10.h,
),
Text(
TranslationLoader.lanKeys!.resetButtonTip2!.tr,
style: TextStyle(fontSize: 20.sp),
)
],
)),
],
),
SizedBox(height: 20.h,),
SizedBox(
height: 30.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}",
style:
TextStyle(fontWeight: FontWeight.w600, fontSize: 20.sp),
)),
],
),
SizedBox(height: 30.h,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
SizedBox(
height: 30.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.closed!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
),
onClick: () {}),
],
),
)
);
));
}
}

View File

@ -34,7 +34,9 @@ class _UnlockQRCodePageState extends State<UnlockQRCodePage> {
borderRadius: BorderRadius.all(Radius.circular(10.h)),
),
child: Text(
"拥有电子钥匙的人,通过微信扫一扫这个二维码,即可开门。每把锁的二维码都不相同,你可以将其打印出来贴在对应的锁旁边")),
"拥有电子钥匙的人,通过微信扫一扫这个二维码,即可开门。每把锁的二维码都不相同,你可以将其打印出来贴在对应的锁旁边",
style: TextStyle(fontSize: 20.sp),
)),
Container(
width: 1.sw,
padding: EdgeInsets.only(top: 50.w),
@ -51,24 +53,22 @@ class _UnlockQRCodePageState extends State<UnlockQRCodePage> {
// size:300,
// ),
// QrImage(data: 'www.baidu.com', size: 300.w),
QrImageView(data: 'www.baidu.com', size: 300.w),
SizedBox(height: 50.w,),
SubmitBtn(btnName: TranslationLoader.lanKeys!.share!.tr,
borderRadius: 20.w,
fontSize: 32.sp,
width: 250.w,
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
onClick: () {
}
QrImageView(data: 'www.baidu.com', size: 260.w),
SizedBox(
height: 50.w,
),
SizedBox(height: 60.w,)
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.share!.tr,
onClick: () {}),
),
SizedBox(
height: 60.w,
)
],
)
),
)),
],
)
);
));
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -13,69 +12,87 @@ class AddWirelessKeyboardPage extends StatefulWidget {
const AddWirelessKeyboardPage({Key? key}) : super(key: key);
@override
State<AddWirelessKeyboardPage> createState() => _AddWirelessKeyboardPageState();
State<AddWirelessKeyboardPage> createState() =>
_AddWirelessKeyboardPageState();
}
class _AddWirelessKeyboardPageState extends State<AddWirelessKeyboardPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
TranslationLoader.lanKeys!.lightTouchScreen!.tr,
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
SizedBox(
height: 90.h,
),
Image.asset(
'images/main/icon_addWirelessKeyboardTip.png',
width: 260.w,
height: 260.w,
),
SizedBox(
height: 90.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr,
style: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
),
],
),
SizedBox(
height: 90.h,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.next!.tr,
onClick: () {
Navigator.pushNamed(
context, Routers.seletWirelessKeyboardPage);
}),
),
SizedBox(
height: 20.h,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr,
onClick: () {
Navigator.pushNamed(
context, Routers.addWirelessKeyboardScreenNotLightOnPage);
}),
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
body: ListView(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100.h,),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(TranslationLoader.lanKeys!.lightTouchScreen!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
],
),
SizedBox(height: 90.h,),
Image.asset('images/main/icon_addWirelessKeyboardTip.png', width: 300.w, height: 300.w,),
SizedBox(height: 90.h,),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
],
),
SizedBox(height: 90.h,),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.next!.tr,
borderRadius: 10.w,
fontSize: 28.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
onClick: (){
Navigator.pushNamed(context, Routers.seletWirelessKeyboardPage);
}
),
// SizedBox(height: 20.h,),
SubmitBtn(
btnName:TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr,
borderRadius: 10.w,
fontSize: 28.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w),
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
onClick: (){
Navigator.pushNamed(context, Routers.addWirelessKeyboardScreenNotLightOnPage);
}
),
],
),
);
}
void onShow(){
}
void onHide(){
}
void onShow() {}
void onHide() {}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -13,64 +12,88 @@ class AddWirelessKeyboardScreenNotLightOnPage extends StatefulWidget {
const AddWirelessKeyboardScreenNotLightOnPage({Key? key}) : super(key: key);
@override
State<AddWirelessKeyboardScreenNotLightOnPage> createState() => _AddWirelessKeyboardScreenNotLightOnPageState();
State<AddWirelessKeyboardScreenNotLightOnPage> createState() =>
_AddWirelessKeyboardScreenNotLightOnPageState();
}
class _AddWirelessKeyboardScreenNotLightOnPageState extends State<AddWirelessKeyboardScreenNotLightOnPage> {
class _AddWirelessKeyboardScreenNotLightOnPageState
extends State<AddWirelessKeyboardScreenNotLightOnPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100.h,),
SizedBox(
height: 100.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(TranslationLoader.lanKeys!.enterNumberOrPressSet!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
Text(
TranslationLoader.lanKeys!.enterNumberOrPressSet!.tr,
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
SizedBox(height: 20.h,),
SizedBox(
height: 20.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("(${TranslationLoader.lanKeys!.theLocationOfTheSetKeyWillBeDifferent!.tr})", style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500),),
Text(
"(${TranslationLoader.lanKeys!.theLocationOfTheSetKeyWillBeDifferent!.tr})",
style: TextStyle(fontSize: 20.sp),
),
],
),
SizedBox(height: 90.h,),
Image.asset('images/main/icon_addWirelessKeyboardUnLightOnTip.png', width: 300.w, height: 300.w,),
SizedBox(height: 90.h,),
SizedBox(
height: 90.h,
),
Image.asset(
'images/main/icon_addWirelessKeyboardUnLightOnTip.png',
width: 260.w,
height: 260.w,
),
SizedBox(
height: 90.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
Text(
TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr,
style: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
),
],
),
SizedBox(height: 90.h,),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.next!.tr,
borderRadius: 10.w,
fontSize: 28.sp,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
onClick: (){
Navigator.pushNamed(context, Routers.seletWirelessKeyboardPage);
}
SizedBox(
height: 90.h,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.next!.tr,
onClick: () {
Navigator.pushNamed(
context, Routers.seletWirelessKeyboardPage);
}),
),
],
),
);
}
void onShow(){
void onShow() {}
}
void onHide(){
}
void onHide() {}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -11,7 +10,8 @@ class SeletWirelessKeyboardPage extends StatefulWidget {
const SeletWirelessKeyboardPage({Key? key}) : super(key: key);
@override
State<SeletWirelessKeyboardPage> createState() => _SeletWirelessKeyboardPageState();
State<SeletWirelessKeyboardPage> createState() =>
_SeletWirelessKeyboardPageState();
}
class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
@ -19,19 +19,23 @@ class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.selet!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.selet!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView.builder(
itemCount:20,
itemBuilder: (c, index){
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){
itemCount: 20,
itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () {
// Navigator.pushNamed(context, Routers.saveLockPage);
});
}
),
}),
);
}
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
Widget nearbyLockItem(
String lockTypeIcon, String lockTypeTitle, Function() action) {
return GestureDetector(
onTap: action,
child: Column(
@ -44,31 +48,41 @@ class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
children: [
// SizedBox(width:20.w),
// Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
SizedBox(width:20.w),
SizedBox(width: 20.w),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 24.sp,
),
),
],
),
),
SizedBox(width:20.w),
Image.asset('images/main/icon_main_addLock.png', width: 50.w, height: 50.w,),
SizedBox(width:30.w),
SizedBox(width: 20.w),
Image.asset(
'images/main/icon_main_addLock.png',
width: 36.w,
height: 36.w,
),
SizedBox(width: 30.w),
],
),
),
Container(height: 0.5.h, color: Colors.grey,)
Container(
height: 0.5.h,
color: Colors.grey,
)
],
),
);
}
void onShow(){
}
void onShow() {}
void onHide(){
}
void onHide() {}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -21,56 +20,72 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.wirelessKeyboard!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
TextButton(
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
onPressed: (){
},),
],),
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.reset!.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {},
),
],
),
body: Column(
children: [
Expanded(child: _buildMainUI()),
SubmitBtn(
btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: (){
btnName:
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
onClick: () {
Navigator.pushNamed(context, Routers.addWirelessKeyboardPage);
}
),
}),
SizedBox(
height: 40.h,
)
],
),
);
}
Widget _buildMainUI(){
Widget _buildMainUI() {
return ListView.builder(
itemCount:10,
itemBuilder: (c, index){
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
itemCount: 10,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_password.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
}
);
});
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
String beginTime, String endTime, Function() action) {
return GestureDetector(
onTap: action,
child: Container(
height: 100.h,
height: 90.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
child: Row(
children: [
SizedBox(width: 30.w,),
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
SizedBox(width: 30.w,),
SizedBox(
width: 30.w,
),
Image.asset(
lockTypeIcon,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 20.w,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -80,26 +95,33 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 24.sp, color: AppColors.blackColor),
),
// SizedBox(width:20.w),
// Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
],
),
),
SizedBox(width:20.w),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
],
),
SizedBox(width: 20.h),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15",
style: TextStyle(
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),
SizedBox(width:20.h),
// SizedBox(width: 20.h),
],
),
),
SizedBox(width:20.h),
SizedBox(width: 20.h),
],
),
),

View File

@ -24,6 +24,29 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
barTitle: TranslationLoader.lanKeys!.operatingRecord!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
IconButton(
icon: Image.asset(
'images/icon_bar_more.png',
height: 30.h,
width: 10.w,
),
onPressed: () {
JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
print('选中index: $index');
print('选中text: $selText');
if (selText == '添加朋友') {
// JhNavUtils.pushNamed(context, 'WxAddFriendPage');
}
if (selText == '扫一扫') {
// _scan();
}
});
},
),
],
/*
actionsList: [
TextButton(
child: const Text(
@ -45,6 +68,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
},
),
],
*/
),
body: Column(
children: [
@ -54,7 +78,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
child: Text(
TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr,
textAlign: TextAlign.start,
style: TextStyle(fontSize: 24.sp),
style: TextStyle(fontSize: 20.sp),
),
),
_searchWidget(),
@ -67,7 +91,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
Widget _searchWidget() {
return Container(
height: 60.h,
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
margin: EdgeInsets.only(left: 20.w, right: 10.w),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(5)),
child: TextField(
@ -106,8 +130,8 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
if (index % 2 == 0) {
return _dateItem("2023-06-29");
} else {
return _operatingRecordItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
return _operatingRecordItem('images/controls_user.png',
"186823150237", "17:56:08用APP开锁", "", () {
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
}
@ -116,14 +140,14 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
Widget _dateItem(String lockDate) {
return Container(
height: 70.h,
height: 60.h,
// color: Colors.red,
padding: EdgeInsets.only(left: 20.h, right: 20.h),
child: Row(
children: [
Text(
lockDate,
style: TextStyle(fontSize: 28.sp),
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
@ -143,16 +167,13 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
),
child: Row(
children: [
SizedBox(
width: 20.w,
),
Image.asset(
lockTypeIcon,
width: 50.w,
height: 50.w,
),
SizedBox(
width: 30.w,
width: 20.w,
),
Expanded(
child: Column(
@ -163,7 +184,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 28.sp, color: AppColors.blackColor),
fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
@ -173,9 +194,9 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15-2023.6.21 11.15",
"17:56:08用APP开锁",
style: TextStyle(
fontSize: 28.sp,
fontSize: 20.sp,
color: AppColors.darkGrayTextColor),
),
],

View File

@ -10,14 +10,15 @@ import '../../../../translations/trans_lib.dart';
class OtherTypeAddKeyPage extends StatefulWidget {
final String seletType;
final int lockType;
const OtherTypeAddKeyPage({Key? key, required this.seletType, required this.lockType}) : super(key: key);
const OtherTypeAddKeyPage(
{Key? key, required this.seletType, required this.lockType})
: super(key: key);
@override
State<OtherTypeAddKeyPage> createState() => _OtherTypeAddKeyPageState();
}
class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
final TextEditingController _controller = TextEditingController();
@override
@ -25,7 +26,7 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
return indexChangeWidget();
}
Widget indexChangeWidget(){
Widget indexChangeWidget() {
switch (int.parse(widget.seletType)) {
case 0:
{
@ -33,7 +34,11 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
// return sendElectronicKeySucceed();
return Column(
children: [
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr,
TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
SizedBox(
height: 30.h,
),
keyBottomWidget()
],
);
@ -43,8 +48,12 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
//
return Column(
children: [
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr,
TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
keyTimeLimitWidget(),
SizedBox(
height: 30.h,
),
keyBottomWidget()
],
);
@ -54,47 +63,68 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
//
return Column(
children: [
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"", isHaveDirection: true, action:(){
// _showDatePicker();
}),
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr,
TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
rightTitle: "",
isHaveDirection: true,
action: () {
// _showDatePicker();
}),
SizedBox(
height: 30.h,
),
keyBottomWidget()
],
);
}
break;
default:
return Container();
}
}
//
Widget perpetualKeyWidget(String titleStr, String rightTitle, TextEditingController controller){
Widget perpetualKeyWidget(
String titleStr, String rightTitle, TextEditingController controller) {
return Column(
children: [
Container(height: 10.h),
CommonItem(leftTitel:titleStr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(rightTitle)),
CommonItem(
leftTitel: titleStr,
rightTitle: "",
isHaveRightWidget: true,
rightWidget: getTFWidget(rightTitle)),
Container(height: 10.h),
],
);
}
//
Widget keyTimeLimitWidget(){
Widget keyTimeLimitWidget() {
return Column(
children: [
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
// _showDatePicker();
}),
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
// _showDatePicker();
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
rightTitle: "2020.06.20 11:49",
isHaveLine: true,
isHaveDirection: true,
action: () {
// _showDatePicker();
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
rightTitle: "2020.06.20 11:49",
isHaveDirection: true,
action: () {
// _showDatePicker();
}),
Container(height: 10.h),
],
);
}
Widget keyBottomWidget(){
Widget keyBottomWidget() {
return Column(
children: [
// Container(
@ -106,17 +136,13 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
// ],
// ),
// ),
SubmitBtn(btnName: '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(widget.lockType)}', borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: (){
}
),
SubmitBtn(btnName: TranslationLoader.lanKeys!.next!.tr, onClick: () {}),
],
);
}
//
Widget sendElectronicKeySucceed(){
Widget sendElectronicKeySucceed() {
return Column(
children: [
Container(
@ -125,30 +151,67 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
color: Colors.white,
child: Column(
children: [
SizedBox(height: 30.h,),
Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w, color: AppColors.mainColor,),
SizedBox(height: 20.h,),
Text("操作成功,密码为",style: TextStyle(fontSize: 32.sp, color: Colors.black, fontWeight: FontWeight.w500),),
SizedBox(height: 10.h,),
Text("62689876",style: TextStyle(fontSize: 60.sp, color: Colors.black, fontWeight: FontWeight.w500),),
SizedBox(
height: 30.h,
),
Image.asset(
'images/main/icon_main_addLock.png',
width: 150.w,
height: 150.w,
color: AppColors.mainColor,
),
SizedBox(
height: 20.h,
),
Text(
"操作成功,密码为",
style: TextStyle(
fontSize: 32.sp,
color: Colors.black,
fontWeight: FontWeight.w500),
),
SizedBox(
height: 10.h,
),
Text(
"62689876",
style: TextStyle(
fontSize: 60.sp,
color: Colors.black,
fontWeight: FontWeight.w500),
),
],
),
),
SizedBox(height: 20.h,),
SubmitBtn(btnName: '完成', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
}),
SubmitBtn(btnName: '分享', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
}),
SubmitBtn(btnName: '标记为:已入住', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
}),
SizedBox(
height: 20.h,
),
SubmitBtn(
btnName: '完成',
fontSize: 28.sp,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
SubmitBtn(
btnName: '分享',
fontSize: 28.sp,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
SubmitBtn(
btnName: '标记为:已入住',
fontSize: 28.sp,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
],
);
}
String getAppBarTitle(int type){
String getAppBarTitle(int type) {
String title;
switch (type) {
case 0:
@ -168,10 +231,10 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
}
//
Widget getTFWidget(String tfStr){
Widget getTFWidget(String tfStr) {
return Container(
height: 50.h,
width: 500.w,
width: 300.w,
child: Row(
children: [
Expanded(
@ -180,20 +243,22 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
maxLines: 1,
// controller: _controller,
autofocus: false,
textAlign:TextAlign.end,
textAlign: TextAlign.end,
decoration: InputDecoration(
//
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
hintText: tfStr,
hintStyle: TextStyle(fontSize: 24.sp),
//线
border: InputBorder.none,
),
),
),
SizedBox(width: 10.w,),
SizedBox(
width: 10.w,
),
],
),
);
}
}

View File

@ -33,7 +33,7 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
TextButton(
child: Text(
TranslationLoader.lanKeys!.share!.tr,
style: const TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {},
),

View File

@ -29,7 +29,7 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
TextButton(
child: Text(
TranslationLoader.lanKeys!.reset!.tr,
style: const TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {},
),
@ -38,18 +38,54 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
body: Column(
children: [
_searchWidget(),
SizedBox(
height: 20.h,
),
Expanded(child: _buildMainUI(type)),
SubmitBtn(
btnName:
'${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}',
borderRadius: 20.w,
margin: EdgeInsets.only(
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
Navigator.pushNamed(context, Routers.otherTypeKeyManagePage,
arguments: type);
}),
GestureDetector(
child: Container(
height: 80.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'images/icon_btn_add.png',
width: 28.w,
height: 28.w,
),
SizedBox(
width: 6.w,
),
Text(
'${TranslationLoader.lanKeys!.add!.tr}${getAppBarTitle(type)}',
style: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
)
],
),
),
onTap: () {
Navigator.pushNamed(context, Routers.otherTypeKeyManagePage,
arguments: type);
},
),
// SubmitBtn(
// btnName:
// '${TranslationLoader.lanKeys!.add!.tr}${getAppBarTitle(type)}',
// onClick: () {
// Navigator.pushNamed(context, Routers.otherTypeKeyManagePage,
// arguments: type);
// }),
SizedBox(
height: 64.h,
)
],
),
);
@ -109,15 +145,34 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
}
Widget _buildMainUI(int type) {
return ListView.builder(
itemCount: 10,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_lock.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.otherTypeKeyDetailPage,
arguments: type);
});
String typeImgName = "";
if (type == 0) {
//
typeImgName = 'images/icon_card.png';
} else if (type == 1) {
//
typeImgName = 'images/icon_fingerprint.png';
} else {
//
typeImgName = 'images/icon_card.png';
}
return ListView.separated(
itemCount: 5,
itemBuilder: (c, index) {
return _electronicKeyItem(
typeImgName, "张三", "2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.otherTypeKeyDetailPage,
arguments: type);
});
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
},
);
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
@ -125,8 +180,8 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
return GestureDetector(
onTap: action,
child: Container(
height: 100.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
height: 90.h,
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
@ -138,11 +193,11 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
),
Image.asset(
lockTypeIcon,
width: 50.w,
height: 50.w,
width: 60.w,
height: 60.w,
),
SizedBox(
width: 30.w,
width: 20.w,
),
Expanded(
child: Column(
@ -154,7 +209,7 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 32.sp, fontWeight: FontWeight.w500),
fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
@ -164,9 +219,10 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15 永久",
"2023.6.21 18:26 永久",
style: TextStyle(
fontSize: 28.sp, fontWeight: FontWeight.w500),
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),

View File

@ -14,14 +14,18 @@ class OtherTypeKeyManagePage extends StatefulWidget {
}
class _OtherTypeKeyManagePageState extends State<OtherTypeKeyManagePage> {
var index=0;
var index = 0;
@override
Widget build(BuildContext context) {
var lockType = ModalRoute.of(context)?.settings.arguments as int;
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.addTip!.tr} ${getAppBarTitle(lockType)}", haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.addTip!.tr}${getAppBarTitle(lockType)}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockType),
@ -30,7 +34,7 @@ class _OtherTypeKeyManagePageState extends State<OtherTypeKeyManagePage> {
);
}
String getAppBarTitle(int type){
String getAppBarTitle(int type) {
String title = "";
switch (type) {
case 0:
@ -47,5 +51,4 @@ class _OtherTypeKeyManagePageState extends State<OtherTypeKeyManagePage> {
}
return title;
}
}

View File

@ -8,15 +8,19 @@ import '../../../../translations/trans_lib.dart';
import '../otherTypeAddKey/otherTypeAddKey_page.dart';
class OtherTypeKeyManageTabbar extends StatefulWidget {
var initialIndex=1;
var lockType=0;
OtherTypeKeyManageTabbar({Key? key, required this.initialIndex, required this.lockType}) : super(key: key);
var initialIndex = 1;
var lockType = 0;
OtherTypeKeyManageTabbar(
{Key? key, required this.initialIndex, required this.lockType})
: super(key: key);
@override
State<OtherTypeKeyManageTabbar> createState() => _OtherTypeKeyManageTabbarState();
State<OtherTypeKeyManageTabbar> createState() =>
_OtherTypeKeyManageTabbarState();
}
class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar> with SingleTickerProviderStateMixin {
class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar>
with SingleTickerProviderStateMixin {
late TabController _tabController;
final List<ItemView> _itemTabs = <ItemView>[
@ -29,45 +33,64 @@ class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar> wit
void initState() {
// TODO: implement initState
super.initState();
_tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
_tabController = TabController(
vsync: this,
length: _itemTabs.length,
initialIndex: widget.initialIndex);
}
@override
Widget build(BuildContext context) {
return Expanded(
child: Column(
children: [
_tabBar(),
_pageWidget(),
],
)
);
children: [
_tabBar(),
_pageWidget(),
],
));
}
TabBar _tabBar(){
TabBar _tabBar() {
return TabBar(
controller: _tabController,
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
isScrollable: true,
indicatorColor: Colors.red,
unselectedLabelColor: Colors.black,
unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
automaticIndicatorColorAdjustment:true,
unselectedLabelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
),
automaticIndicatorColorAdjustment: true,
labelColor: AppColors.mainColor,
labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 28.sp,fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
labelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(
borderSide: BorderSide(color: AppColors.mainColor, width: 4.w),
strokeCap: StrokeCap.round,
width: 30.w),
);
}
Tab _tab(ItemView item) {
return Tab(child: SizedBox(width: 1.sw/5, child: Text(item.title, textAlign: TextAlign.center)));
return Tab(
child: SizedBox(
width: 1.sw / 5,
child: Text(item.title, textAlign: TextAlign.center)));
}
Widget _pageWidget(){
Widget _pageWidget() {
return Expanded(
child: TabBarView(
controller: _tabController,
children: _itemTabs.map((ItemView item) => OtherTypeAddKeyPage(seletType: item.seletType, lockType: widget.lockType,)).toList(),
children: _itemTabs
.map((ItemView item) => OtherTypeAddKeyPage(
seletType: item.seletType,
lockType: widget.lockType,
))
.toList(),
),
);
}

View File

@ -28,9 +28,9 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: const Text(
child: Text(
"分享",
style: TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {},
),

View File

@ -28,7 +28,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
TextButton(
child: Text(
TranslationLoader.lanKeys!.reset!.tr,
style: const TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {},
),
@ -37,16 +37,59 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
body: Column(
children: [
_searchWidget(),
SizedBox(
height: 20.h,
),
Expanded(child: _buildMainUI()),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
Navigator.pushNamed(context, Routers.passwordKeyManagePage);
}),
SizedBox(
height: 20.h,
),
GestureDetector(
child: Container(
height: 80.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'images/icon_btn_add.png',
width: 28.w,
height: 28.w,
),
SizedBox(
width: 6.w,
),
Text(
TranslationLoader.lanKeys!.getPassword!.tr,
style: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
)
],
),
),
onTap: () {
Navigator.pushNamed(context, Routers.passwordKeyManagePage);
},
),
// SubmitBtn(
// btnName: TranslationLoader.lanKeys!.getPassword!.tr,
// borderRadius: 20.w,
// margin: EdgeInsets.only(
// left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
// padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
// onClick: () {
// Navigator.pushNamed(context, Routers.passwordKeyManagePage);
// }),
SizedBox(
height: 42.h,
)
],
),
);
@ -88,14 +131,21 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
}
Widget _buildMainUI() {
return ListView.builder(
itemCount: 10,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_lock.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.passwordKeyDetailPage);
});
return ListView.separated(
itemCount: 5,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_password.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.passwordKeyDetailPage);
});
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
},
);
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
@ -103,12 +153,9 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
return GestureDetector(
onTap: action,
child: Container(
height: 100.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
height: 90.h,
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
color: Colors.white,
child: Row(
children: [
SizedBox(
@ -116,11 +163,11 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
),
Image.asset(
lockTypeIcon,
width: 50.w,
height: 50.w,
width: 60.w,
height: 60.w,
),
SizedBox(
width: 30.w,
width: 20.w,
),
Expanded(
child: Column(
@ -132,7 +179,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 32.sp, fontWeight: FontWeight.w500),
fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
@ -142,9 +189,10 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15 永久",
"2023.6.21 18:00 清空码",
style: TextStyle(
fontSize: 28.sp, fontWeight: FontWeight.w500),
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),

View File

@ -8,14 +8,18 @@ import '../../../../translations/trans_lib.dart';
import '../passwordKey_Perpetual/passwordKey_perpetual_page.dart';
class PasswordKeyManageTabbarPage extends StatefulWidget {
var initialIndex=1;
var initialIndex = 1;
PasswordKeyManageTabbarPage({Key? key, required this.initialIndex}) : super(key: key);
PasswordKeyManageTabbarPage({Key? key, required this.initialIndex})
: super(key: key);
@override
State<PasswordKeyManageTabbarPage> createState() => _PasswordKeyManageTabbarPageState();
State<PasswordKeyManageTabbarPage> createState() =>
_PasswordKeyManageTabbarPageState();
}
class _PasswordKeyManageTabbarPageState extends State<PasswordKeyManageTabbarPage> with SingleTickerProviderStateMixin {
class _PasswordKeyManageTabbarPageState
extends State<PasswordKeyManageTabbarPage>
with SingleTickerProviderStateMixin {
late TabController _tabController;
final List<ItemView> _itemTabs = <ItemView>[
@ -31,33 +35,44 @@ class _PasswordKeyManageTabbarPageState extends State<PasswordKeyManageTabbarPag
void initState() {
// TODO: implement initState
super.initState();
_tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
_tabController = TabController(
vsync: this,
length: _itemTabs.length,
initialIndex: widget.initialIndex);
}
@override
Widget build(BuildContext context) {
return Expanded(
child: Column(
children: [
_tabBar(),
_pageWidget(),
],
)
);
children: [
_tabBar(),
_pageWidget(),
],
));
}
TabBar _tabBar(){
TabBar _tabBar() {
return TabBar(
controller: _tabController,
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
isScrollable: true,
indicatorColor: Colors.red,
unselectedLabelColor: Colors.black,
unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
automaticIndicatorColorAdjustment:true,
unselectedLabelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
),
automaticIndicatorColorAdjustment: true,
labelColor: AppColors.mainColor,
labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 28.sp,fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
labelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(
borderSide: BorderSide(color: AppColors.mainColor, width: 4.w),
strokeCap: StrokeCap.round,
width: 30.w),
);
}
@ -65,19 +80,26 @@ class _PasswordKeyManageTabbarPageState extends State<PasswordKeyManageTabbarPag
return Tab(
// text: item.title,
child: Container(
width: 1.sw/8,
width: 1.sw / 8,
// margin: EdgeInsets.all(10.w),
// color: Colors.red,
child: Text(item.title, textAlign: TextAlign.center,),
child: Text(
item.title,
textAlign: TextAlign.center,
),
),
);
}
Widget _pageWidget(){
Widget _pageWidget() {
return Expanded(
child: TabBarView(
controller: _tabController,
children: _itemTabs.map((ItemView item) => PasswordKeyPerpetualPage(type: item.type,)).toList(),
children: _itemTabs
.map((ItemView item) => PasswordKeyPerpetualPage(
type: item.type,
))
.toList(),
),
);
}

View File

@ -49,7 +49,6 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
],
);
}
break;
case 1:
{
//
@ -64,7 +63,6 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
],
);
}
break;
case 2:
{
//
@ -78,7 +76,6 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
],
);
}
break;
case 3:
{
//
@ -95,7 +92,6 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
],
);
}
break;
case 4:
{
//
@ -110,7 +106,6 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
],
);
}
break;
case 5:
{
//
@ -124,10 +119,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
],
);
}
break;
default:
return Container();
break;
}
}
@ -136,78 +129,91 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
String titleStr, String rightTitle, TextEditingController controller) {
return Column(
children: [
Container(height: 10.h),
CommonItem(
leftTitel: titleStr,
rightTitle: "",
isHaveRightWidget: true,
rightWidget: getTFWidget(rightTitle)),
Container(height: 10.h),
SizedBox(height: 10.h),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: CommonItem(
leftTitel: titleStr,
rightTitle: "",
isHaveRightWidget: true,
rightWidget: getTFWidget(rightTitle)),
),
SizedBox(height: 10.h),
],
);
}
//
Widget keyTimeLimitWidget() {
return Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
rightTitle: "2020.06.20 11:49",
isHaveLine: true,
isHaveDirection: true,
action: () {
// _showDatePicker();
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
rightTitle: "2020.06.20 11:49",
isHaveDirection: true,
action: () {
// _showDatePicker();
}),
Container(height: 10.h),
],
return Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
rightTitle: "2020.06.20 11:49",
isHaveLine: true,
isHaveDirection: true,
action: () {
// _showDatePicker();
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
rightTitle: "2020.06.20 11:49",
isHaveDirection: true,
action: () {
// _showDatePicker();
}),
Container(height: 10.h),
],
),
);
}
//
Widget keyIfPerpetualWidget() {
return Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.permanent!.tr,
rightTitle: "",
isHaveRightWidget: true,
rightWidget: Container(width: 80.w, height: 50.h, child: _switch()),
action: () {}),
Container(height: 10.h),
],
return Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.permanent!.tr,
rightTitle: "",
isHaveRightWidget: true,
rightWidget:
Container(width: 80.w, height: 50.h, child: _switch()),
action: () {}),
Container(height: 10.h),
],
),
);
}
//
Widget keyCirculationWidget() {
return Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.recursiveDevice!.tr,
rightTitle: "周末",
isHaveLine: true,
isHaveDirection: true,
action: () {}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
rightTitle: "10:00",
isHaveLine: true,
isHaveDirection: true,
action: () {}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
rightTitle: "11:00",
isHaveDirection: true,
action: () {}),
],
return Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.recursiveDevice!.tr,
rightTitle: "周末",
isHaveLine: true,
isHaveDirection: true,
action: () {}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
rightTitle: "10:00",
isHaveLine: true,
isHaveDirection: true,
action: () {}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
rightTitle: "11:00",
isHaveDirection: true,
action: () {}),
],
),
);
}
@ -223,15 +229,16 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
child: Text(
tipStr,
textAlign: TextAlign.start,
style: TextStyle(fontSize: 20.sp),
)),
],
),
),
SizedBox(
height: 20.h,
),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
borderRadius: 20.w,
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {}),
],
);
@ -313,7 +320,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
Widget getTFWidget(String tfStr) {
return Container(
height: 50.h,
width: 500.w,
width: 300.w,
child: Row(
children: [
Expanded(
@ -327,6 +334,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
//
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
hintText: tfStr,
hintStyle: TextStyle(fontSize: 22.sp),
//线
border: InputBorder.none,
),

View File

@ -31,7 +31,6 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget {
@override
Widget build(BuildContext context) {
// final logic = Get.put(GetxBle());
// // Get.lazyPut(()=>GetxBle());
// logic.scanner.startScan([]);
@ -66,7 +65,7 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget {
Widget getLockList() {
return ListView.builder(
itemCount: 10,
itemCount: 5,
itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () {
Navigator.pushNamed(context, Routers.lockDetailPage);

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../appRouters.dart';
@ -19,14 +19,22 @@ class _LockAddressPageState extends State<LockAddressPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: "锁地址", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
TextButton(
child: Text("保存", style: const TextStyle(color: Colors.white),),
onPressed: (){
Navigator.pushNamed(context, Routers.saveLockPage);
},),
],),
body:Container()
);
appBar: TitleAppBar(
barTitle: "锁地址",
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
"保存",
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {
Navigator.pushNamed(context, Routers.saveLockPage);
},
),
],
),
body: Container());
}
}

View File

@ -30,8 +30,8 @@ class _GatewayListPageState extends State<GatewayListPage> {
},
child: Image.asset(
'images/icon_add_white.png',
width: 40.w,
height: 40.w,
width: 36.w,
height: 36.w,
)),
SizedBox(
width: 30.w,

View File

@ -265,7 +265,7 @@ class _AddAuthorizedAdministratorPageState
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
rightTitle: "",
isHaveRightWidget: true,
rightWidget: Container(width: 80.w, height: 50.h, child: _switch()),
rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()),
action: () {}),
Container(height: 40.h),
],

View File

@ -27,7 +27,11 @@ class _AuthorizedAdministratorListPageState
backgroundColor: AppColors.mainColor,
actionsList: [
IconButton(
icon: Image.asset('images/icon_add_white.png'),
icon: Image.asset(
'images/icon_add_white.png',
width: 36.w,
height: 36.w,
),
onPressed: () {
//
Navigator.pushNamed(
@ -82,7 +86,7 @@ class _AuthorizedAdministratorListPageState
Widget _buildMainUI() {
return ListView.builder(
itemCount: 10,
itemCount: 5,
itemBuilder: (c, index) {
return _electronicKeyItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
@ -109,11 +113,11 @@ class _AuthorizedAdministratorListPageState
),
Image.asset(
lockTypeIcon,
width: 44.w,
height: 44.w,
width: 60.w,
height: 60.w,
),
SizedBox(
width: 30.w,
width: 20.w,
),
Expanded(
child: Column(
@ -125,23 +129,21 @@ class _AuthorizedAdministratorListPageState
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 24.sp, fontWeight: FontWeight.w500),
fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
SizedBox(height: 5.h),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15 永久",
style: TextStyle(
fontSize: 20.sp,
color: AppColors.darkGrayTextColor),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15 永久",
style: TextStyle(
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),
SizedBox(width: 20.h),
],

View File

@ -26,7 +26,11 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
haveBack: true,
actionsList: [
IconButton(
icon: Image.asset('images/icon_add_white.png'),
icon: Image.asset(
'images/icon_add_white.png',
width: 36.w,
height: 36.w,
),
onPressed: () {
// -
},

View File

@ -104,14 +104,21 @@ class _LockUserManageListListPageState
}
Widget _buildMainUI() {
return ListView.builder(
itemCount: 10,
itemBuilder: (c, index) {
return _electronicKeyItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
});
return ListView.separated(
itemCount: 5,
itemBuilder: (c, index) {
return _electronicKeyItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.ownedKeyListPage);
});
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
},
);
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
@ -120,7 +127,6 @@ class _LockUserManageListListPageState
onTap: action,
child: Container(
height: 90.h,
margin: EdgeInsets.only(top: 1.h),
color: Colors.white,
// decoration: BoxDecoration(
// color: Colors.white,
@ -133,11 +139,11 @@ class _LockUserManageListListPageState
),
Image.asset(
lockTypeIcon,
width: 44.w,
height: 44.w,
width: 60.w,
height: 60.w,
),
SizedBox(
width: 30.w,
width: 20.w,
),
Expanded(
child: Column(
@ -148,7 +154,8 @@ class _LockUserManageListListPageState
children: [
Text(
lockTypeTitle,
style: TextStyle(fontSize: 24.sp),
style: TextStyle(
fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
@ -159,8 +166,8 @@ class _LockUserManageListListPageState
Text(
"2023.6.21 11.15 永久",
style: TextStyle(
fontSize: 20.sp,
color: AppColors.darkGrayTextColor),
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),

View File

@ -0,0 +1,121 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../../../appRouters.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../tools/titleAppBar.dart';
class OwnedKeyListPage extends StatefulWidget {
const OwnedKeyListPage({Key? key}) : super(key: key);
@override
State<OwnedKeyListPage> createState() => _OwnedKeyListPageState();
}
class _OwnedKeyListPageState extends State<OwnedKeyListPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: "拥有的钥匙",
haveBack: true,
backgroundColor: AppColors.mainColor,
),
body: Column(
children: [
_topOwnedKeyText(),
Expanded(child: _buildMainUI()),
],
),
);
}
Widget _topOwnedKeyText() {
return Container(
color: Colors.white,
width: ScreenUtil().screenWidth,
// margin: EdgeInsets.only(left: 30.w, top: 30.w, right: 30.w, bottom: 30.w),
child: Padding(
padding:
EdgeInsets.only(left: 30.w, top: 30.w, right: 20.w, bottom: 10.w),
child: Text(
"拥有的钥匙",
style: TextStyle(fontSize: 24.sp),
),
),
);
}
Widget _buildMainUI() {
return ListView.builder(
itemCount: 5,
itemBuilder: (c, index) {
return _electronicKeyItem('images/controls_user.png', "JBL01_5a3de9",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
});
});
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
String beginTime, String endTime, Function() action) {
return GestureDetector(
onTap: action,
child: Container(
height: 90.h,
margin: const EdgeInsets.only(top: 1),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
child: Row(
children: [
SizedBox(
width: 30.w,
),
Image.asset(
lockTypeIcon,
width: 60.w,
height: 60.w,
),
SizedBox(
width: 20.w,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 24.sp, color: AppColors.blackColor),
),
],
),
SizedBox(height: 5.h),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15 永久",
style: TextStyle(
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),
SizedBox(width: 20.h),
],
),
),
SizedBox(width: 20.h),
],
),
),
);
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -17,35 +16,55 @@ class SupportStaffPage extends StatefulWidget {
}
class _SupportStaffPageState extends State<SupportStaffPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFFFFFFFF),
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.supportStaff!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.supportStaff!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
supportStaffItem(TranslationLoader.lanKeys!.email!.tr, "786612630@qq.com", true, true, 'images/mine/icon_mine_supportStaff_openEmail.png',() async {
String url = 'mailto:smith@example.org?subject=News&body=New%20plugin' ;
supportStaffItem(
TranslationLoader.lanKeys!.email!.tr,
"786612630@qq.com",
true,
true,
'images/mine/icon_mine_supportStaff_openEmail.png', () async {
String url =
'mailto:smith@example.org?subject=News&body=New%20plugin';
_pushUrl(url);
}),
supportStaffItem(TranslationLoader.lanKeys!.businessCooperation!.tr, "www.starLock.com", true, true, 'images/mine/icon_mine_supportStaff_openEmail.png',() async {
supportStaffItem(
TranslationLoader.lanKeys!.businessCooperation!.tr,
"www.starLock.com",
true,
true,
'images/mine/icon_mine_supportStaff_openEmail.png', () async {
const url = 'tel:15080825640';
_pushUrl(url);
}),
supportStaffItem(TranslationLoader.lanKeys!.officialWebsite!.tr, "www.starLock.com", true, true, 'images/mine/icon_mine_supportStaff_jump.png',() async {
supportStaffItem(
TranslationLoader.lanKeys!.officialWebsite!.tr,
"www.starLock.com",
true,
true,
'images/mine/icon_mine_supportStaff_jump.png', () async {
const url = 'https://blog.csdn.net/shulianghan';
_pushUrl(url);
}),
supportStaffItem(TranslationLoader.lanKeys!.computerWebVersion!.tr, "www.starLock.com", false, true, '',(){
}),
supportStaffItem(TranslationLoader.lanKeys!.hotelSystem!.tr, "www.starLock.com", false, true, '',(){
}),
supportStaffItem(TranslationLoader.lanKeys!.manualWebVersion!.tr, "www.starLock.com", true, true, 'images/mine/icon_mine_supportStaff_jump.png',(){
}),
supportStaffItem(TranslationLoader.lanKeys!.computerWebVersion!.tr,
"www.starLock.com", false, true, '', () {}),
supportStaffItem(TranslationLoader.lanKeys!.hotelSystem!.tr,
"www.starLock.com", false, true, '', () {}),
supportStaffItem(
TranslationLoader.lanKeys!.manualWebVersion!.tr,
"www.starLock.com",
true,
true,
'images/mine/icon_mine_supportStaff_jump.png',
() {}),
],
),
);
@ -59,7 +78,14 @@ class _SupportStaffPageState extends State<SupportStaffPage> {
}
}
Widget supportStaffItem (String? leftTitel, String? rightTitle, bool? isHaveRightImg, bool? isHaveLine, String? rightImg, Function()? action,){
Widget supportStaffItem(
String? leftTitel,
String? rightTitle,
bool? isHaveRightImg,
bool? isHaveLine,
String? rightImg,
Function()? action,
) {
return GestureDetector(
onTap: action,
child: Column(
@ -68,27 +94,42 @@ class _SupportStaffPageState extends State<SupportStaffPage> {
Container(
height: 80.h,
color: Colors.white,
padding: EdgeInsets.only(left:20.w, right: 10.w),// , top: 20.w, bottom: 20.w
padding: EdgeInsets.only(
left: 20.w, right: 10.w), // , top: 20.w, bottom: 20.w
child: Row(
children: [
SizedBox(width:20.w),
Expanded(child: Text(leftTitel!, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))),
SizedBox(width:20.w),
SizedBox(width: 20.w),
Expanded(
child: Text(leftTitel!, style: TextStyle(fontSize: 24.sp))),
SizedBox(width: 20.w),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [Text(rightTitle!, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))
children: [
Text(rightTitle!,
textAlign: TextAlign.end,
style: TextStyle(fontSize: 22.sp))
],
),
SizedBox(width:5.w),
isHaveRightImg!?Image.asset(rightImg!, width: 50.w, height: 50.w,):SizedBox(width:10.w),
SizedBox(width: 5.w),
isHaveRightImg!
? Image.asset(
rightImg!,
width: 36.w,
height: 36.w,
)
: SizedBox(width: 10.w),
// SizedBox(width:10.w),
],
),
),
isHaveLine!?Container(height: 0.5.h, color: Colors.grey,):Container()
isHaveLine!
? Container(
height: 0.5.h,
color: Colors.grey,
)
: Container()
],
),
);
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -12,11 +11,17 @@ class ValueAddedServicesBuyPage extends StatefulWidget {
const ValueAddedServicesBuyPage({Key? key}) : super(key: key);
@override
State<ValueAddedServicesBuyPage> createState() => _ValueAddedServicesBuyPageState();
State<ValueAddedServicesBuyPage> createState() =>
_ValueAddedServicesBuyPageState();
}
class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
final data = ["1", "2", "3", "4", ];
final data = [
"1",
"2",
"3",
"4",
];
@override
Widget build(BuildContext context) {
@ -24,21 +29,27 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle: _getNavTitle(type), haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle: _getNavTitle(type),
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
Container(
width: 1.sw,
// height: 400.h,
color: Colors.white,
padding: EdgeInsets.only(left:25.h, right: 25.h, top: 25.h, bottom: 10.h),
padding: EdgeInsets.only(
left: 25.h, right: 25.h, top: 25.h, bottom: 10.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationLoader.lanKeys!.chooseAPackage!.tr, style: TextStyle(fontSize: 32.sp),),
Text(
TranslationLoader.lanKeys!.chooseAPackage!.tr,
style: TextStyle(fontSize: 24.sp),
),
],
)
),
)),
Expanded(
child: GridView.count(
padding: EdgeInsets.all(10.w),
@ -51,40 +62,71 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
),
Container(
color: Colors.white,
padding: EdgeInsets.only(left:25.h, right: 25.h, top: 25.h, bottom: 10.h),
padding: EdgeInsets.only(
left: 25.h, right: 25.h, top: 25.h, bottom: 10.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationLoader.lanKeys!.modeOfPayment!.tr, style: TextStyle(fontSize: 32.sp),),
SizedBox(height: 20.h,),
Text(
TranslationLoader.lanKeys!.modeOfPayment!.tr,
style: TextStyle(fontSize: 32.sp),
),
SizedBox(
height: 20.h,
),
Row(
children: [
Image.asset('images/mine/icon_mine_valueAddedServices_zfb.png', width: 40.w, height: 40.w,),
SizedBox(width:20.w),
Expanded(child: Text(TranslationLoader.lanKeys!.alipay!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))),
SizedBox(width:5.w),
Image.asset('images/icon_round_selet.png', width: 40.w, height: 40.w,)
Image.asset(
'images/mine/icon_mine_valueAddedServices_zfb.png',
width: 40.w,
height: 40.w,
),
SizedBox(width: 20.w),
Expanded(
child: Text(TranslationLoader.lanKeys!.alipay!.tr,
style: TextStyle(
fontSize: 28.sp, fontWeight: FontWeight.w500))),
SizedBox(width: 5.w),
Image.asset(
'images/icon_round_selet.png',
width: 40.w,
height: 40.w,
)
],
),
SizedBox(height: 20.h,),
SizedBox(
height: 20.h,
),
],
),
),
Container(height: 10.h, color: const Color(0xFFF5F5F5),),
Container(
height: 10.h,
color: const Color(0xFFF5F5F5),
),
Container(
height: 100.h,
color: Colors.white,
child: Row(
children: [
SizedBox(width:20.w),
Expanded(child: Text("¥50", style: TextStyle(fontSize: 36.sp, color: AppColors.mainColor, fontWeight: FontWeight.w500))),
SizedBox(width:5.w),
SizedBox(width: 20.w),
Expanded(
child: Text("¥50",
style: TextStyle(
fontSize: 36.sp,
color: AppColors.mainColor,
fontWeight: FontWeight.w500))),
SizedBox(width: 5.w),
Container(
width: 180.w,
height: 100.h,
color: AppColors.mainColor,
child: Center(child: Text(TranslationLoader.lanKeys!.goToPay!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white, fontWeight: FontWeight.w500)))
)
child: Center(
child: Text(TranslationLoader.lanKeys!.goToPay!.tr,
style: TextStyle(
fontSize: 32.sp,
color: Colors.white,
fontWeight: FontWeight.w500))))
],
),
)
@ -96,26 +138,31 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
Container _buildItem(String title) {
return Container(
margin: EdgeInsets.all(10.w),
padding: EdgeInsets.only(left:30.w, top: 20.h, bottom: 20.h),
padding: EdgeInsets.only(left: 30.w, top: 20.h, bottom: 20.h),
decoration: BoxDecoration(
color: title == "1" ? const Color(0xFFEDF1FD):Colors.white,
color: title == "1" ? const Color(0xFFEDF1FD) : Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.h)),
border: Border.all(width: 0.5.w, color: Colors.black)
),
border: Border.all(width: 0.5.w, color: Colors.black)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("500条", style: TextStyle(fontSize: 36.sp),),
Text(
"500条",
style: TextStyle(fontSize: 36.sp),
),
SizedBox(height: 10.h),
Text("¥50 (¥0.08/条)", style: TextStyle(fontSize: 32.sp),),
Text(
"¥50 (¥0.08/条)",
style: TextStyle(fontSize: 32.sp),
),
],
),
);
}
String _getNavTitle(int type){
String _getNavTitle(int type) {
String topTitle = "";
switch(type){
switch (type) {
case 1:
topTitle = TranslationLoader.lanKeys!.buySMS!.tr;
break;
@ -123,7 +170,8 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
topTitle = TranslationLoader.lanKeys!.buyMail!.tr;
break;
case 3:
topTitle = TranslationLoader.lanKeys!.buyRealNameAuthenticationTimes!.tr;
topTitle =
TranslationLoader.lanKeys!.buyRealNameAuthenticationTimes!.tr;
break;
case 4:
topTitle = TranslationLoader.lanKeys!.enablingAdvancedFeatures!.tr;

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -7,15 +6,20 @@ import '../../../../tools/CustomUnderlineTabIndicator.dart';
import '../valueAddedServicesBuyAndUseRecord_page.dart';
class ValueAddedServicesBuyAndUseRecordManageTabbar extends StatefulWidget {
var initialIndex=1;
var initialIndex = 1;
ValueAddedServicesBuyAndUseRecordManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
ValueAddedServicesBuyAndUseRecordManageTabbar(
{Key? key, required this.initialIndex})
: super(key: key);
@override
State<ValueAddedServicesBuyAndUseRecordManageTabbar> createState() => _ValueAddedServicesBuyAndUseRecordManageTabbarState();
State<ValueAddedServicesBuyAndUseRecordManageTabbar> createState() =>
_ValueAddedServicesBuyAndUseRecordManageTabbarState();
}
class _ValueAddedServicesBuyAndUseRecordManageTabbarState extends State<ValueAddedServicesBuyAndUseRecordManageTabbar> with SingleTickerProviderStateMixin {
class _ValueAddedServicesBuyAndUseRecordManageTabbarState
extends State<ValueAddedServicesBuyAndUseRecordManageTabbar>
with SingleTickerProviderStateMixin {
late TabController _tabController;
final List<ItemView> _itemTabs = <ItemView>[
@ -29,33 +33,44 @@ class _ValueAddedServicesBuyAndUseRecordManageTabbarState extends State<ValueAdd
void initState() {
// TODO: implement initState
super.initState();
_tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
_tabController = TabController(
vsync: this,
length: _itemTabs.length,
initialIndex: widget.initialIndex);
}
@override
Widget build(BuildContext context) {
return Expanded(
child: Column(
children: [
_tabBar(),
_pageWidget(),
],
)
);
children: [
_tabBar(),
_pageWidget(),
],
));
}
TabBar _tabBar(){
TabBar _tabBar() {
return TabBar(
controller: _tabController,
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
isScrollable: true,
indicatorColor: Colors.red,
unselectedLabelColor: Colors.black,
unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
automaticIndicatorColorAdjustment:true,
unselectedLabelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
),
automaticIndicatorColorAdjustment: true,
labelColor: AppColors.mainColor,
labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
labelStyle: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp,
fontWeight: FontWeight.w600),
indicator: CustomUnderlineTabIndicator(
borderSide: BorderSide(color: AppColors.mainColor, width: 4.w),
strokeCap: StrokeCap.round,
width: 30.w),
);
}
@ -63,19 +78,26 @@ class _ValueAddedServicesBuyAndUseRecordManageTabbarState extends State<ValueAdd
return Tab(
// text: item.title,
child: Container(
width: 1.sw/4,
width: 1.sw / 4,
margin: EdgeInsets.all(10.w),
// color: Colors.red,
child: Text(item.title, textAlign: TextAlign.center,),
child: Text(
item.title,
textAlign: TextAlign.center,
),
),
);
}
Widget _pageWidget(){
Widget _pageWidget() {
return Expanded(
child: TabBarView(
controller: _tabController,
children: _itemTabs.map((ItemView item) => ValueAddedServicesBuyAndUseRecordPage(type: item.type,)).toList(),
children: _itemTabs
.map((ItemView item) => ValueAddedServicesBuyAndUseRecordPage(
type: item.type,
))
.toList(),
),
);
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -13,16 +12,23 @@ class ValueAddedServicesHighFunctionPage extends StatefulWidget {
const ValueAddedServicesHighFunctionPage({Key? key}) : super(key: key);
@override
State<ValueAddedServicesHighFunctionPage> createState() => _ValueAddedServicesHighFunctionPageState();
State<ValueAddedServicesHighFunctionPage> createState() =>
_ValueAddedServicesHighFunctionPageState();
}
class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesHighFunctionPage> {
class _ValueAddedServicesHighFunctionPageState
extends State<ValueAddedServicesHighFunctionPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.advancedFunction!.tr, haveBack:true, iconColor: Colors.black, titleColor: Colors.black, backgroundColor: Colors.white),
body:Column(
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.advancedFunction!.tr,
haveBack: true,
iconColor: Colors.black,
titleColor: Colors.black,
backgroundColor: Colors.white),
body: Column(
children: [
Expanded(
child: ListView(
@ -36,11 +42,10 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
),
_bottomBtn(),
],
)
);
));
}
Widget _topShowState(){
Widget _topShowState() {
return Container(
height: 150.h,
margin: EdgeInsets.only(left: 30.w, top: 20.h, right: 30.w),
@ -63,10 +68,18 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("${TranslationLoader.lanKeys!.currentState!.tr}:${TranslationLoader.lanKeys!.haveNotOpened!.tr}", style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600),),
Text(
"${TranslationLoader.lanKeys!.currentState!.tr}:${TranslationLoader.lanKeys!.haveNotOpened!.tr}",
style:
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
),
SizedBox(height: 5.h),
Text("${TranslationLoader.lanKeys!.periodValidity!.tr}:2023-07-29", style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600),),
],//
Text(
"${TranslationLoader.lanKeys!.periodValidity!.tr}:2023-07-29",
style:
TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w600),
),
], //
),
],
),
@ -74,8 +87,8 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
bottom: 0.h,
right: 0.w,
child: Container(
width: 120.w,
height: 60.h,
width: 90.w,
height: 50.h,
decoration: BoxDecoration(
color: const Color(0xFFBDCDDF),
borderRadius: BorderRadius.only(
@ -83,52 +96,66 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
bottomLeft: Radius.circular(30.h),
),
),
child: Center(child: Text(TranslationLoader.lanKeys!.record!.tr)),
)
),
child: Center(
child: Text(
TranslationLoader.lanKeys!.record!.tr,
style: TextStyle(fontSize: 22.sp),
)),
)),
],
),
);
}
Widget _benefitsContent(){
Widget _benefitsContent() {
return Column(
children: [
Container(
// color: Colors.red,
margin: EdgeInsets.only(left: 30.w, top: 50.h, right: 30.w),
margin: EdgeInsets.only(left: 130.w, top: 50.h, right: 130.w),
padding: EdgeInsets.only(left: 30.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset('images/mine/icon_mine_highFunctionContent_left.png', width: 40.w, height: 40.w),
SizedBox(width: 10.w,),
Expanded(
child: Text(TranslationLoader.lanKeys!.advancedFeaturesAndBenefitsContent!.tr, textAlign: TextAlign.center,style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600)),
),
SizedBox(width: 10.w,),
Image.asset('images/mine/icon_mine_highFunctionContent_right.png', width: 40.w, height: 40.w)
]
),
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Image.asset('images/mine/icon_mine_highFunctionContent_left.png',
width: 30.w, height: 30.w),
Expanded(
child: Text(
TranslationLoader
.lanKeys!.advancedFeaturesAndBenefitsContent!.tr,
textAlign: TextAlign.center,
style:
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600)),
),
Image.asset('images/mine/icon_mine_highFunctionContent_right.png',
width: 30.w, height: 30.w)
]),
),
SizedBox(
height: 10.h,
),
SizedBox(height: 10.h,),
Container(
height: 1.sw,
child: GridView.count(
padding: EdgeInsets.all(10.h),
crossAxisCount: 3,
mainAxisSpacing: 10.h,
crossAxisSpacing: 10.h,
crossAxisSpacing: 8.h,
// childAspectRatio: 1 / 0.5,
physics: const NeverScrollableScrollPhysics(),
children: [
_buildItem("images/mine/icon_mine_highFunctionContent_dxmb.png", TranslationLoader.lanKeys!.smsTemplate!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_yjmb.png", TranslationLoader.lanKeys!.emailTemplate!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_sqgly.png", TranslationLoader.lanKeys!.authorizedAdmin!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_sfz.png", TranslationLoader.lanKeys!.lockGroup!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", TranslationLoader.lanKeys!.sendGroupKey!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", TranslationLoader.lanKeys!.markedHouseState!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_fkgj.png", TranslationLoader.lanKeys!.cardIssuingtool!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_dxmb.png",
TranslationLoader.lanKeys!.smsTemplate!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_yjmb.png",
TranslationLoader.lanKeys!.emailTemplate!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_sqgly.png",
TranslationLoader.lanKeys!.authorizedAdmin!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_sfz.png",
TranslationLoader.lanKeys!.lockGroup!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_bjft.png",
TranslationLoader.lanKeys!.sendGroupKey!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_bjft.png",
TranslationLoader.lanKeys!.markedHouseState!.tr),
_buildItem("images/mine/icon_mine_highFunctionContent_fkgj.png",
TranslationLoader.lanKeys!.cardIssuingtool!.tr),
],
),
),
@ -139,7 +166,7 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
Container _buildItem(String img, String title) {
return Container(
margin: EdgeInsets.all(10.h),
padding: EdgeInsets.only(top: 30.h),
padding: EdgeInsets.only(top: 20.h),
decoration: BoxDecoration(
color: const Color(0xFFF7F7FA),
borderRadius: BorderRadius.all(Radius.circular(20.h)),
@ -148,15 +175,21 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 90.w,
height: 90.w,
child: Image.asset(img)
Image.asset(
img,
width: 70.w,
height: 70.w,
),
SizedBox(
height: 10.h,
),
SizedBox(height: 10.h,),
Column(
children: [
Text(title, style: TextStyle(fontSize: 32.sp), textAlign: TextAlign.center,),
Text(
title,
style: TextStyle(fontSize: 22.sp),
textAlign: TextAlign.center,
),
],
),
],
@ -164,23 +197,32 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
);
}
Widget _buyNotes(){
Widget _buyNotes() {
return Column(
children: [
Container(
// color: Colors.red,
margin: EdgeInsets.only(left: 30.w, top: 50.h, right: 30.w),
padding: EdgeInsets.only(left: 30.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset('images/mine/icon_mine_highFunctionContent_left.png', width: 40.w, height: 40.w),
SizedBox(width: 10.w,),
Expanded(child: Text(TranslationLoader.lanKeys!.titleForBuyingAdvancedFeatures!.tr, textAlign: TextAlign.center, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600))),
SizedBox(width: 10.w,),
Image.asset('images/mine/icon_mine_highFunctionContent_right.png', width: 40.w, height: 40.w)
]
),
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Image.asset('images/mine/icon_mine_highFunctionContent_left.png',
width: 40.w, height: 40.w),
SizedBox(
width: 10.w,
),
Expanded(
child: Text(
TranslationLoader
.lanKeys!.titleForBuyingAdvancedFeatures!.tr,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 24.sp, fontWeight: FontWeight.w600))),
SizedBox(
width: 10.w,
),
Image.asset('images/mine/icon_mine_highFunctionContent_right.png',
width: 40.w, height: 40.w)
]),
),
SizedBox(height: 20.h),
Container(
@ -190,15 +232,17 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
borderRadius: BorderRadius.circular(10.h),
),
child: Padding(
padding: EdgeInsets.only(left: 30.w, top: 30.h, right: 30.w, bottom: 30.h),
child: Text(TranslationLoader.lanKeys!.tipsForBuyingAdvancedFeatures!.tr)),
padding: EdgeInsets.only(
left: 30.w, top: 30.h, right: 30.w, bottom: 30.h),
child: Text(TranslationLoader
.lanKeys!.tipsForBuyingAdvancedFeatures!.tr)),
),
SizedBox(height: 20.h),
],
);
}
Widget _bottomBtn(){
Widget _bottomBtn() {
return Container(
margin: EdgeInsets.only(top: 30.h, bottom: 30.h),
child: Row(
@ -206,23 +250,28 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
Visibility(
child: Container(
height: 100.h,
width: (1.sw-20.w*3)/2,
width: (1.sw - 20.w * 3) / 2,
margin: EdgeInsets.only(left: 20.w),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(width: 3.w, color: const Color(0xFF000635)),
borderRadius: BorderRadius.circular(50.h),
),
child: Center(child: Text(TranslationLoader.lanKeys!.freeTrial!.tr, style: TextStyle(fontSize: 34.sp),)),
child: Center(
child: Text(
TranslationLoader.lanKeys!.freeTrial!.tr,
style: TextStyle(fontSize: 34.sp),
)),
),
),
GestureDetector(
onTap: (){
Navigator.pushNamed(context, Routers.valueAddedServicesBuyPage, arguments: 4);
onTap: () {
Navigator.pushNamed(context, Routers.valueAddedServicesBuyPage,
arguments: 4);
},
child: Container(
height: 100.h,
width: (1.sw-20.w*3)/2,
width: (1.sw - 20.w * 3) / 2,
// width: 1.sw-20.w*2,
margin: EdgeInsets.only(left: 20.w, right: 20.w),
decoration: BoxDecoration(
@ -230,7 +279,12 @@ class _ValueAddedServicesHighFunctionPageState extends State<ValueAddedServicesH
border: Border.all(width: 1, color: AppColors.mainColor),
borderRadius: BorderRadius.circular(50.h),
),
child: Center(child: Text(TranslationLoader.lanKeys!.openNow!.tr, style: TextStyle(fontSize: 34.sp, color: const Color(0xFFF9CEAC)),)),
child: Center(
child: Text(
TranslationLoader.lanKeys!.openNow!.tr,
style:
TextStyle(fontSize: 34.sp, color: const Color(0xFFF9CEAC)),
)),
),
),
],

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -12,82 +11,135 @@ class ValueAddedServicesListPage extends StatefulWidget {
const ValueAddedServicesListPage({Key? key}) : super(key: key);
@override
State<ValueAddedServicesListPage> createState() => _ValueAddedServicesPageListState();
State<ValueAddedServicesListPage> createState() =>
_ValueAddedServicesPageListState();
}
class _ValueAddedServicesPageListState extends State<ValueAddedServicesListPage> {
class _ValueAddedServicesPageListState
extends State<ValueAddedServicesListPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.valueAddedServices!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.valueAddedServices!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView(
children: [
_valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_note.png'), TranslationLoader.lanKeys!.note!.tr, (){
Navigator.pushNamed(context, Routers.valueAddedServicesNoteAndEmailDetailPage, arguments: 1);
}),
_valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_email.png'), TranslationLoader.lanKeys!.mail!.tr, (){
Navigator.pushNamed(context, Routers.valueAddedServicesNoteAndEmailDetailPage, arguments: 2);
}),
_valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_realName.png'), TranslationLoader.lanKeys!.realNameAuthentication!.tr, (){
Navigator.pushNamed(context, Routers.valueAddedServicesRealNamePage);
}),
_valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'), TranslationLoader.lanKeys!.advancedFunction!.tr, (){
Navigator.pushNamed(context, Routers.valueAddedServicesHighFunctionPage);
}),
_valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_push.png'), TranslationLoader.lanKeys!.pushMessage!.tr, (){
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_checkIn.png'), TranslationLoader.lanKeys!.checkingIn!.tr, (){
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_storage.png'), TranslationLoader.lanKeys!.recordsRetention!.tr, (){
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(Text("A", style: TextStyle(color: Colors.white, fontSize: 38.sp, fontWeight: FontWeight.w600),), "Amazon Alexa", (){
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(Text("G", style: TextStyle(color: Colors.white, fontSize: 38.sp, fontWeight: FontWeight.w600),), "Google Home", (){
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
],
children: [
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_note.png'),
TranslationLoader.lanKeys!.note!.tr, () {
Navigator.pushNamed(
context, Routers.valueAddedServicesNoteAndEmailDetailPage,
arguments: 1);
}),
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_email.png'),
TranslationLoader.lanKeys!.mail!.tr, () {
Navigator.pushNamed(
context, Routers.valueAddedServicesNoteAndEmailDetailPage,
arguments: 2);
}),
_valueAddedServicesItem(
Image.asset(
'images/mine/icon_mine_valueAddedServices_realName.png'),
TranslationLoader.lanKeys!.realNameAuthentication!.tr, () {
Navigator.pushNamed(
context, Routers.valueAddedServicesRealNamePage);
}),
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
TranslationLoader.lanKeys!.advancedFunction!.tr, () {
Navigator.pushNamed(
context, Routers.valueAddedServicesHighFunctionPage);
}),
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_push.png'),
TranslationLoader.lanKeys!.pushMessage!.tr, () {
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Image.asset(
'images/mine/icon_mine_valueAddedServices_checkIn.png'),
TranslationLoader.lanKeys!.checkingIn!.tr, () {
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Image.asset(
'images/mine/icon_mine_valueAddedServices_storage.png'),
TranslationLoader.lanKeys!.recordsRetention!.tr, () {
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Text(
"A",
style: TextStyle(
color: Colors.white,
fontSize: 38.sp,
fontWeight: FontWeight.w600),
),
"Amazon Alexa", () {
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Text(
"G",
style: TextStyle(
color: Colors.white,
fontSize: 38.sp,
fontWeight: FontWeight.w600),
),
"Google Home", () {
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
],
),
);
}
Widget _valueAddedServicesItem(Widget widget, String gateWayName, Function() action){
Widget _valueAddedServicesItem(
Widget widget, String gateWayName, Function() action) {
return GestureDetector(
onTap: action,
child: Container(
// height: 100.h,
margin: EdgeInsets.only(top: 20.h, right: 20.w, left: 20.w),
padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h, bottom: 20.h),
decoration: BoxDecoration(
padding:
EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h, bottom: 20.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
child: Row(
children: [
Container(
width: 70.w,
height: 70.w,
width: 60.w,
height: 60.w,
padding: EdgeInsets.all(12.h),
decoration: BoxDecoration(
color: AppColors.mainColor,
borderRadius: BorderRadius.circular(40.w)
),
borderRadius: BorderRadius.circular(40.w)),
child: Center(child: widget),
),
SizedBox(width: 20.w,),
Expanded(
child: Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600), ),
SizedBox(
width: 20.w,
),
SizedBox(width:20.h),
Image.asset('images/icon_right.png', width: 50.w, height: 50.w,)
Expanded(
child: Text(
gateWayName,
style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
),
),
SizedBox(width: 20.h),
Image.asset(
'images/icon_right_grey.png',
width: 12.w,
height: 21.w,
)
],
),
),
);
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -13,33 +12,45 @@ class ValueAddedServicesNoteAndEmailDetailPage extends StatefulWidget {
const ValueAddedServicesNoteAndEmailDetailPage({Key? key}) : super(key: key);
@override
State<ValueAddedServicesNoteAndEmailDetailPage> createState() => _ValueAddedServicesNoteAndEmailDetailPageState();
State<ValueAddedServicesNoteAndEmailDetailPage> createState() =>
_ValueAddedServicesNoteAndEmailDetailPageState();
}
class _ValueAddedServicesNoteAndEmailDetailPageState extends State<ValueAddedServicesNoteAndEmailDetailPage> {
class _ValueAddedServicesNoteAndEmailDetailPageState
extends State<ValueAddedServicesNoteAndEmailDetailPage> {
@override
Widget build(BuildContext context) {
var type = ModalRoute.of(context)?.settings.arguments as int;
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: type == 1?TranslationLoader.lanKeys!.note!.tr:TranslationLoader.lanKeys!.mail!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body: Column(
children: [
Container(
width: 1.sw,
// color: Colors.grey.shade300,
padding: EdgeInsets.only(left:25.h, right: 25.h, top: 25.h, bottom: 10.h),
child: Text(type == 1?TranslationLoader.lanKeys!.smsBuyTip!.tr:TranslationLoader.lanKeys!.emailBuyTip!.tr)
),
middleWidget(type),
],
),
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: type == 1
? TranslationLoader.lanKeys!.note!.tr
: TranslationLoader.lanKeys!.mail!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
Container(
width: 1.sw,
// color: Colors.grey.shade300,
padding: EdgeInsets.only(
left: 25.h, right: 25.h, top: 25.h, bottom: 10.h),
child: Text(
type == 1
? TranslationLoader.lanKeys!.smsBuyTip!.tr
: TranslationLoader.lanKeys!.emailBuyTip!.tr,
style: TextStyle(
color: AppColors.darkGrayTextColor, fontSize: 18.sp),
)),
middleWidget(type),
],
),
);
}
Widget middleWidget(int type){
Widget middleWidget(int type) {
return Container(
width: 1.sw,
// height: 100,
@ -47,82 +58,103 @@ class _ValueAddedServicesNoteAndEmailDetailPageState extends State<ValueAddedSer
margin: EdgeInsets.all(10.h),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("images/mine/icon_mine_valueAddedServices_noteTop.png"),
fit: BoxFit.cover
)
),
child: Column(
children: [
// SizedBox(height:10),
Container(
margin: const EdgeInsets.only(top:15, bottom: 15, left: 30, right: 30),
child: Row(
children: [
Expanded(child: Text("${TranslationLoader.lanKeys!.currentRemainingQuantity!.tr}:0", style: TextStyle(fontSize: 32.sp),)),
GestureDetector(
onTap: (){
Navigator.pushNamed(context, Routers.valueAddedServicesBuyPage, arguments: type);
},
child: Container(
width: 50,
height: 25,
decoration: BoxDecoration(
color: AppColors.mainColor,
borderRadius: BorderRadius.circular(25)
),
child: Center(child: Text(TranslationLoader.lanKeys!.buy!.tr, style: const TextStyle(color: Colors.white)))
),
),
],
image: AssetImage(
"images/mine/icon_mine_valueAddedServices_noteTop.png"),
fit: BoxFit.cover)),
child: Column(children: [
// SizedBox(height:10),
Container(
margin:
const EdgeInsets.only(top: 15, bottom: 15, left: 30, right: 30),
child: Row(
children: [
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentRemainingQuantity!.tr}:0",
style: TextStyle(fontSize: 24.sp),
)),
GestureDetector(
onTap: () {
Navigator.pushNamed(
context, Routers.valueAddedServicesBuyPage,
arguments: type);
},
child: Container(
width: 50,
height: 25,
decoration: BoxDecoration(
color: AppColors.mainColor,
borderRadius: BorderRadius.circular(25)),
child: Center(
child: Text(TranslationLoader.lanKeys!.buy!.tr,
style: TextStyle(
color: Colors.white, fontSize: 24.sp)))),
),
),
// SizedBox(height:20.h),
Container(
margin: const EdgeInsets.only(top:10, bottom: 10),
// color: Colors.red,
// height: 100.h,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: (){
if(type == 1){
Navigator.pushNamed(context, Routers.valueAddedServicesListSMSTemplatePage);
}else{
Navigator.pushNamed(context, Routers.valueAddedServicesListEmailTemplatePage);
}
},
child: Container(
// width:100,
// padding: EdgeInsets.only(top:5, bottom: 5, left: 5, right: 5),
child: Row(
children: [
SizedBox(width: 30.w,),
Image.asset("images/mine/icon_mine_valueAddedServices_buyIcon.png", width: 50.w, height: 50.w,),
Text((type == 1)?TranslationLoader.lanKeys!.customSMSTemplate!.tr:TranslationLoader.lanKeys!.customMailTemplate!.tr, style: TextStyle(fontSize: 32.sp),),
],
],
),
),
// SizedBox(height:20.h),
Container(
margin: const EdgeInsets.only(top: 10, bottom: 10),
// color: Colors.red,
// height: 100.h,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
if (type == 1) {
Navigator.pushNamed(context,
Routers.valueAddedServicesListSMSTemplatePage);
} else {
Navigator.pushNamed(context,
Routers.valueAddedServicesListEmailTemplatePage);
}
},
child: Container(
// width:100,
// padding: EdgeInsets.only(top:5, bottom: 5, left: 5, right: 5),
child: Row(
children: [
SizedBox(
width: 30.w,
),
),
Image.asset(
"images/mine/icon_mine_valueAddedServices_buyIcon.png",
width: 36.w,
height: 36.w,
),
Text(
(type == 1)
? TranslationLoader.lanKeys!.customSMSTemplate!.tr
: TranslationLoader
.lanKeys!.customMailTemplate!.tr,
style: TextStyle(fontSize: 24.sp),
),
],
),
GestureDetector(
onTap: (){
Navigator.pushNamed(context, Routers.valueAddedServicesBuyAndUseRecordManagePage);
},
child: Container(
width:90,
// height: 70.h,
margin: const EdgeInsets.only(left: 30, right: 30),
padding: EdgeInsets.only(top:5, bottom: 5, left: 5, right: 5),
// color: Colors.red,
child: Center(child: Text(TranslationLoader.lanKeys!.record!.tr, style: TextStyle(color: Colors.black, fontSize: 32.sp)))
),
),
],
),
),
),
]
)
);
GestureDetector(
onTap: () {
Navigator.pushNamed(context,
Routers.valueAddedServicesBuyAndUseRecordManagePage);
},
child: Container(
width: 90,
// height: 70.h,
margin: const EdgeInsets.only(left: 30, right: 30),
padding: const EdgeInsets.only(
top: 5, bottom: 5, left: 5, right: 5),
// color: Colors.red,
child: Center(
child: Text(TranslationLoader.lanKeys!.record!.tr,
style: TextStyle(
color: Colors.black, fontSize: 24.sp)))),
),
],
),
),
]));
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -13,24 +12,32 @@ class ValueAddedServicesRealNamePage extends StatefulWidget {
const ValueAddedServicesRealNamePage({Key? key}) : super(key: key);
@override
State<ValueAddedServicesRealNamePage> createState() => _ValueAddedServicesRealNamePageState();
State<ValueAddedServicesRealNamePage> createState() =>
_ValueAddedServicesRealNamePageState();
}
class _ValueAddedServicesRealNamePageState extends State<ValueAddedServicesRealNamePage> {
class _ValueAddedServicesRealNamePageState
extends State<ValueAddedServicesRealNamePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.realNameAuthentication!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
Container(
width: 1.sw,
// color: Colors.grey.shade300,
padding: EdgeInsets.only(left:25.h, right: 25.h, top: 25.h, bottom: 10.h),
child: Text(TranslationLoader.lanKeys!.buyRealNameTip!.tr)
),
padding: EdgeInsets.only(
left: 25.h, right: 25.h, top: 25.h, bottom: 10.h),
child: Text(
TranslationLoader.lanKeys!.buyRealNameTip!.tr,
style: TextStyle(
color: AppColors.darkGrayTextColor, fontSize: 20.sp),
)),
middleWidget(),
bottomWidget()
],
@ -38,7 +45,7 @@ class _ValueAddedServicesRealNamePageState extends State<ValueAddedServicesRealN
);
}
Widget middleWidget(){
Widget middleWidget() {
return Container(
width: 1.sw,
// height: 100,
@ -46,61 +53,66 @@ class _ValueAddedServicesRealNamePageState extends State<ValueAddedServicesRealN
margin: EdgeInsets.all(10.h),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("images/mine/icon_mine_valueAddedServices_noteTop.png"),
fit: BoxFit.cover
)
),
child: Column(
children: [
// SizedBox(height:10),
Container(
margin: const EdgeInsets.only(top:15, bottom: 15, left: 30, right: 30),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("${TranslationLoader.lanKeys!.currentRemainingQuantity!.tr}:0", style: TextStyle(fontSize: 32.sp),)
],
image: AssetImage(
"images/mine/icon_mine_valueAddedServices_noteTop.png"),
fit: BoxFit.cover)),
child: Column(children: [
// SizedBox(height:10),
Container(
margin:
const EdgeInsets.only(top: 15, bottom: 15, left: 30, right: 30),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"${TranslationLoader.lanKeys!.currentRemainingQuantity!.tr}:0",
style: TextStyle(fontSize: 24.sp),
)
],
),
),
// SizedBox(height:20.h),
Container(
margin: const EdgeInsets.only(top: 10, bottom: 10),
// color: Colors.red,
// height: 100.h,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
GestureDetector(
onTap: () {},
child: Container(
width: 200.w,
// height: 70.h,
// color: Colors.red,
child: Center(
child: Text(TranslationLoader.lanKeys!.record!.tr,
style: TextStyle(
color: Colors.black, fontSize: 24.sp)))),
),
),
// SizedBox(height:20.h),
Container(
margin: const EdgeInsets.only(top:10, bottom: 10),
// color: Colors.red,
// height: 100.h,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
GestureDetector(
onTap: (){
},
child: Container(
width: 200.w,
// height: 70.h,
// color: Colors.red,
child: Center(child: Text(TranslationLoader.lanKeys!.record!.tr, style: TextStyle(color: Colors.black, fontSize: 32.sp)))
),
),
GestureDetector(
onTap: (){
Navigator.pushNamed(context, Routers.valueAddedServicesBuyPage, arguments: 3);
},
child: Container(
width: 200.w,
// height: 70.h,
// color: Colors.red,
child: Center(child: Text(TranslationLoader.lanKeys!.buy!.tr, style: TextStyle(color: AppColors.mainColor, fontSize: 32.sp)))
),
),
],
GestureDetector(
onTap: () {
Navigator.pushNamed(
context, Routers.valueAddedServicesBuyPage,
arguments: 3);
},
child: Container(
width: 200.w,
// height: 70.h,
// color: Colors.red,
child: Center(
child: Text(TranslationLoader.lanKeys!.buy!.tr,
style: TextStyle(
color: AppColors.mainColor,
fontSize: 24.sp)))),
),
),
]
)
);
],
),
),
]));
}
Widget bottomWidget(){
Widget bottomWidget() {
return Container(
width: 1.sw,
color: Colors.white,
@ -110,39 +122,87 @@ class _ValueAddedServicesRealNamePageState extends State<ValueAddedServicesRealN
Column(
children: [
Container(
padding: EdgeInsets.only(top:20.h, bottom: 20.h, left: 30.w),
child: Text(TranslationLoader.lanKeys!.buyRealNameSeletYouWantBuyTip!.tr, style: TextStyle(fontSize: 32.sp),)
),
padding: EdgeInsets.only(top: 20.h, bottom: 20.h, left: 30.w),
child: Text(
TranslationLoader
.lanKeys!.buyRealNameSeletYouWantBuyTip!.tr,
style:
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
)),
],
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.forTheFirstTime!.tr, rightTitle:"", allHeight:80.h, isHaveLine: true, isHaveRightWidget: true,
CommonItem(
leftTitel: TranslationLoader.lanKeys!.forTheFirstTime!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.onceDay!.tr, rightTitle:"", allHeight:80.h, isHaveLine: true, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.onceDay!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.weekOnce!.tr, rightTitle:"", allHeight:80.h, isHaveLine: true, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.weekOnce!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
CommonItem(leftTitel:TranslationLoader.lanKeys!.monthOnce!.tr, rightTitle:"", allHeight:80.h, isHaveLine: false, isHaveRightWidget: true,
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.monthOnce!.tr,
rightTitle: "",
allHeight: 60.h,
isHaveLine: false,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: (){
},
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
),
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
],
),
);

View File

@ -11,6 +11,7 @@ class CommonItem extends StatelessWidget {
Widget? rightWidget;
Function()? action;
double? allHeight;
bool? isTipsImg;
CommonItem(
{Key? key,
@ -21,6 +22,7 @@ class CommonItem extends StatelessWidget {
this.isHaveLine = false,
this.isHaveRightWidget = false,
this.rightWidget,
this.isTipsImg,
this.action})
: super(key: key);
@ -39,9 +41,18 @@ class CommonItem extends StatelessWidget {
child: Row(
children: [
SizedBox(width: 20.w),
Expanded(
child: Text(leftTitel!, style: TextStyle(fontSize: 22.sp))),
SizedBox(width: 20.w),
Text(leftTitel!, style: TextStyle(fontSize: 22.sp)),
SizedBox(
width: 6.w,
),
isTipsImg == true
? Image.asset(
'images/icon_tips_Q.png',
width: 20.w,
height: 20.w,
)
: Container(),
Expanded(child: SizedBox(width: 20.w)),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@ -56,7 +67,7 @@ class CommonItem extends StatelessWidget {
)
],
),
SizedBox(width: 8.w),
isHaveDirection! ? SizedBox(width: 8.w) : Container(),
isHaveDirection!
? Image.asset(
'images/icon_right_grey.png',
@ -64,7 +75,7 @@ class CommonItem extends StatelessWidget {
height: 21.w,
)
: SizedBox(width: 20.w),
SizedBox(width: 20.w),
isHaveDirection! ? SizedBox(width: 20.w) : Container(),
],
),
),

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'screen_utils.dart';
@ -10,7 +9,7 @@ List _listData = [
];
const Color _bgColor = Color(0xFF2D2D2D);
const double _fontSize = 16.0;
const double _fontSize = 20.0;
const double _cellHeight = 50.0;
const double _imgWH = 22.0;
@ -24,7 +23,7 @@ class JhPopMenus {
Widget buildMenuCell(dataArr) {
return ListView.builder(
itemCount: dataArr.length,
itemExtent: _cellHeight,
itemExtent: _cellHeight.h,
padding: const EdgeInsets.all(0.0),
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) {
@ -37,10 +36,12 @@ class JhPopMenus {
},
child: Row(
children: <Widget>[
const SizedBox(width: 25),
SizedBox(width: 25),
// Image.asset(dataArr[index]['icon'], width: _imgWH, height: _imgWH, color: Colors.white),
// const SizedBox(width: 15),
Text("你好", style: const TextStyle(color: Colors.white, fontSize: _fontSize)),
Text("你好",
style: TextStyle(
color: Colors.white, fontSize: _fontSize.sp)),
],
),
),
@ -50,7 +51,7 @@ class JhPopMenus {
}
Widget menusView(dataArr) {
var cellH = dataArr.length * _cellHeight;
var cellH = dataArr.length * _cellHeight.h;
var navH = JhScreenUtils.navigationBarHeight;
return Positioned(
right: 10,
@ -61,18 +62,27 @@ class JhPopMenus {
Image.asset('images/ic_menu_up_arrow.png', width: 28, height: 5),
ClipRRect(
borderRadius: BorderRadius.circular(5),
child: Container(color: _bgColor, width: 160, height: cellH, child: buildMenuCell(dataArr)),
child: Container(
color: _bgColor,
width: 160,
height: cellH,
child: buildMenuCell(dataArr)),
)
],
),
);
}
Navigator.of(context).push(DialogRouter(_BasePopMenus(child: menusView(_listData))));
Navigator.of(context)
.push(DialogRouter(_BasePopMenus(child: menusView(_listData))));
}
/// 线 pop
static void showLinePop(BuildContext context, {bool isShowBg = false, Function(int selectIndex, String selectText)? clickCallback,}) {
static void showLinePop(
BuildContext context, {
bool isShowBg = false,
Function(int selectIndex, String selectText)? clickCallback,
}) {
// 线
Widget buildMenuLineCell(dataArr) {
return ListView.separated(
@ -87,28 +97,36 @@ class JhPopMenus {
clickCallback?.call(index, _listData[index]['text']);
Navigator.pop(context);
},
child: Container(
height: _cellHeight,
padding: EdgeInsets.only(left: 20.h),
child: SizedBox(
height: _cellHeight.h,
// padding: EdgeInsets.only(left: 20.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
// const SizedBox(width: 25),
// Image.asset(dataArr[index]['icon'], width: _imgWH, height: _imgWH, color: Colors.white),
// const SizedBox(width: 12),
Center(child: Text(dataArr[index]['text'], style: const TextStyle(color: Colors.white, fontSize: _fontSize)))
Center(
child: Text(dataArr[index]['text'],
style: TextStyle(
color: Colors.white, fontSize: _fontSize.sp)))
],
),
),
),
);
},
separatorBuilder: (context, index) =>
const Divider(height: .1, indent: 50, endIndent: 0, color: Color(0xFFE6E6E6)),
separatorBuilder: (context, index) => Divider(
height: .1,
indent: 20.w,
endIndent: 20.w,
color: Color(0xFFE6E6E6)),
);
}
Widget menusView(dataArr) {
var cellH = dataArr.length * _cellHeight;
var cellH = dataArr.length * _cellHeight.h;
var navH = JhScreenUtils.navigationBarHeight;
if (isShowBg == true) {
navH = navH - JhScreenUtils.topSafeHeight;
@ -124,7 +142,11 @@ class JhPopMenus {
Image.asset('images/ic_menu_up_arrow.png', width: 28, height: 5),
ClipRRect(
borderRadius: BorderRadius.circular(5),
child: Container(color: _bgColor, width: 180.w, height: cellH, child: buildMenuLineCell(dataArr)))
child: Container(
color: _bgColor,
width: 180.w,
height: cellH,
child: buildMenuLineCell(dataArr)))
],
),
);
@ -140,7 +162,8 @@ class JhPopMenus {
},
);
} else {
Navigator.of(context).push(DialogRouter(_BasePopMenus(child: menusView(_listData))));
Navigator.of(context)
.push(DialogRouter(_BasePopMenus(child: menusView(_listData))));
}
}
}
@ -148,7 +171,10 @@ class JhPopMenus {
class _BasePopMenus extends Dialog {
final child;
const _BasePopMenus({Key? key, this.child,}) : super(key: key);
const _BasePopMenus({
Key? key,
this.child,
}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -176,7 +202,8 @@ class DialogRouter extends PageRouteBuilder {
barrierColor: Colors.white10.withAlpha(1),
transitionDuration: const Duration(milliseconds: 150),
pageBuilder: (context, animation, secondaryAnimation) => page,
transitionsBuilder: (context, animation, secondaryAnimation, child) => child,
transitionsBuilder: (context, animation, secondaryAnimation, child) =>
child,
);
}

View File

@ -104,6 +104,8 @@ class LanKeyEntity {
this.electricQuantity,
this.lockName,
this.lockGrouping,
this.selectGroup,
this.createNewGroup,
this.adminOpenLockPassword,
this.update,
this.updateElectricQuantityTip,
@ -137,7 +139,8 @@ class LanKeyEntity {
this.high,
this.higher,
this.burglarAlarmTip,
this.resetButtonTip,
this.resetButtonTip1,
this.resetButtonTip2,
this.calibrationTime,
this.setTheDSTMode,
this.diagnoseTip,
@ -239,6 +242,7 @@ class LanKeyEntity {
this.problemThree,
this.pleaseEnterYourAnswer,
this.aboutToExpire,
this.changeName,
this.designation,
this.state,
this.wifiName,
@ -467,7 +471,8 @@ class LanKeyEntity {
high = json['high'];
higher = json['higher'];
burglarAlarmTip = json['burglarAlarmTip'];
resetButtonTip = json['resetButtonTip'];
resetButtonTip1 = json['resetButtonTip1'];
resetButtonTip2 = json['resetButtonTip2'];
calibrationTime = json['calibrationTime'];
setTheDSTMode = json['setTheDSTMode'];
diagnoseTip = json['diagnoseTip'];
@ -502,6 +507,8 @@ class LanKeyEntity {
electricQuantity = json['electricQuantity'];
lockName = json['lockName'];
lockGrouping = json['lockGrouping'];
selectGroup = json['selectGroup'];
createNewGroup = json['createNewGroup'];
adminOpenLockPassword = json['adminOpenLockPassword'];
update = json['update'];
updateElectricQuantityTip = json['updateElectricQuantityTip'];
@ -615,6 +622,7 @@ class LanKeyEntity {
problemThree = json['problemThree'];
pleaseEnterYourAnswer = json['pleaseEnterYourAnswer'];
aboutToExpire = json['aboutToExpire'];
changeName = json['changeName'];
designation = json['designation'];
state = json['state'];
@ -858,7 +866,8 @@ class LanKeyEntity {
String? high;
String? higher;
String? burglarAlarmTip;
String? resetButtonTip;
String? resetButtonTip1;
String? resetButtonTip2;
String? calibrationTime;
String? setTheDSTMode;
String? diagnoseTip;
@ -961,6 +970,8 @@ class LanKeyEntity {
String? authorizedAdmin;
String? addAuthorizedAdmin;
String? lockGroup;
String? selectGroup;
String? createNewGroup;
String? transferSmartLock;
String? selectiveLock;
String? recipientInformation;
@ -1002,6 +1013,7 @@ class LanKeyEntity {
String? problemThree;
String? pleaseEnterYourAnswer;
String? aboutToExpire;
String? changeName;
String? designation;
String? state;
@ -1241,7 +1253,8 @@ class LanKeyEntity {
map['high'] = high;
map['higher'] = higher;
map['burglarAlarmTip'] = burglarAlarmTip;
map['resetButtonTip'] = resetButtonTip;
map['resetButtonTip1'] = resetButtonTip1;
map['resetButtonTip2'] = resetButtonTip2;
map['calibrationTime'] = calibrationTime;
map['setTheDSTMode'] = setTheDSTMode;
map['diagnoseTip'] = diagnoseTip;
@ -1390,6 +1403,7 @@ class LanKeyEntity {
map['problemThree'] = problemThree;
map['pleaseEnterYourAnswer'] = pleaseEnterYourAnswer;
map['aboutToExpire'] = aboutToExpire;
map['changeName'] = changeName;
map['designation'] = designation;
map['state'] = state;