更新部分UI
This commit is contained in:
parent
2127a001ce
commit
1ddd8cca5c
@ -40,7 +40,7 @@
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
|
||||
@ -34,17 +34,20 @@ class _AbountPageState extends State<AbountPage> {
|
||||
children: [
|
||||
Image.asset(
|
||||
"images/icon_main_1024.png",
|
||||
width: 200.w,
|
||||
height: 200.w,
|
||||
width: 160.w,
|
||||
height: 160.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
height: 20.h,
|
||||
),
|
||||
Text(
|
||||
"星锁 1.0.0",
|
||||
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
|
||||
),
|
||||
const Text("通通锁 6.7.0"),
|
||||
SizedBox(
|
||||
height: 80.h,
|
||||
height: 60.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.introduce!.tr,
|
||||
|
||||
@ -26,8 +26,8 @@ class _MessageListPageState extends State<MessageListPage> {
|
||||
body: ListView.builder(
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _seletGatewayListListItem('images/icon_lockGroup_item.png',
|
||||
"您的钥匙已发送成功", "2023.6.21 11.15", () {
|
||||
return _seletGatewayListListItem(
|
||||
'images/controls_user.png', "您的钥匙已发送成功", "2023.6.21 11.15", () {
|
||||
// Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
|
||||
});
|
||||
}),
|
||||
@ -39,10 +39,10 @@ class _MessageListPageState extends State<MessageListPage> {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
// height: 100.h,
|
||||
height: 90.h,
|
||||
margin: const EdgeInsets.only(bottom: 2),
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
// padding:
|
||||
// EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
@ -54,8 +54,8 @@ class _MessageListPageState extends State<MessageListPage> {
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 80.w,
|
||||
height: 80.w,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
@ -64,33 +64,29 @@ class _MessageListPageState extends State<MessageListPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
gateWayName,
|
||||
style: TextStyle(
|
||||
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
gateWayName,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp, color: AppColors.blackColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 5.h),
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
// Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
|
||||
// SizedBox(width: 10.w,),
|
||||
Text(
|
||||
networkSignal,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
// Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
|
||||
// SizedBox(width: 10.w,),
|
||||
Text(
|
||||
networkSignal,
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
color: AppColors.placeholderTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20.h),
|
||||
],
|
||||
|
||||
@ -54,7 +54,7 @@ class _LockItemListPageState extends State<LockItemListPage> {
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
height: 70.h,
|
||||
height: 80.h,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -64,16 +64,16 @@ class _LockItemListPageState extends State<LockItemListPage> {
|
||||
),
|
||||
Image.asset(
|
||||
'images/icon_lockGroup_item.png',
|
||||
width: 30,
|
||||
height: 30,
|
||||
width: 36,
|
||||
height: 36,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
const Text(
|
||||
Text(
|
||||
'Daisy',
|
||||
style: TextStyle(fontSize: 14),
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -53,7 +53,7 @@ class _OwnedKeyListPageState extends State<OwnedKeyListPage> {
|
||||
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);
|
||||
// Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -121,8 +121,8 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> {
|
||||
GestureDetector(
|
||||
child: Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 16,
|
||||
height: 16,
|
||||
width: 22,
|
||||
height: 22,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
@ -130,8 +130,8 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> {
|
||||
),
|
||||
Image.asset(
|
||||
'images/icon_lockGroup_item.png',
|
||||
width: 30,
|
||||
height: 30,
|
||||
width: 36,
|
||||
height: 36,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
SizedBox(
|
||||
@ -139,7 +139,7 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> {
|
||||
),
|
||||
Text(
|
||||
'Daisy',
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
style: TextStyle(fontSize: 22.sp, color: AppColors.blackColor),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -28,7 +28,7 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
|
||||
var type = ModalRoute.of(context)?.settings.arguments as int;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
backgroundColor: AppColors.greyBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: _getNavTitle(type),
|
||||
haveBack: true,
|
||||
@ -51,13 +51,16 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
|
||||
],
|
||||
)),
|
||||
Expanded(
|
||||
child: GridView.count(
|
||||
padding: EdgeInsets.all(10.w),
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 10.w,
|
||||
childAspectRatio: 1 / 0.5,
|
||||
children: data.map((title) => _buildItem(title)).toList(),
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
child: GridView.count(
|
||||
padding: EdgeInsets.all(10.w),
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 10.w,
|
||||
childAspectRatio: 1 / 0.5,
|
||||
children: data.map((title) => _buildItem(title)).toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
@ -69,7 +72,10 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
|
||||
children: [
|
||||
Text(
|
||||
TranslationLoader.lanKeys!.modeOfPayment!.tr,
|
||||
style: TextStyle(fontSize: 32.sp),
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: AppColors.blackColor,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
@ -78,14 +84,14 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/mine/icon_mine_valueAddedServices_zfb.png',
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
width: 30.w,
|
||||
height: 30.w,
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Text(TranslationLoader.lanKeys!.alipay!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500))),
|
||||
fontSize: 24.sp, color: AppColors.blackColor))),
|
||||
SizedBox(width: 5.w),
|
||||
Image.asset(
|
||||
'images/icon_round_selet.png',
|
||||
@ -105,7 +111,7 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
|
||||
color: const Color(0xFFF5F5F5),
|
||||
),
|
||||
Container(
|
||||
height: 100.h,
|
||||
height: 80.h,
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: [
|
||||
@ -113,7 +119,7 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
|
||||
Expanded(
|
||||
child: Text("¥50",
|
||||
style: TextStyle(
|
||||
fontSize: 36.sp,
|
||||
fontSize: 24.sp,
|
||||
color: AppColors.mainColor,
|
||||
fontWeight: FontWeight.w500))),
|
||||
SizedBox(width: 5.w),
|
||||
@ -124,11 +130,14 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
|
||||
child: Center(
|
||||
child: Text(TranslationLoader.lanKeys!.goToPay!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 32.sp,
|
||||
fontSize: 24.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500))))
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -148,12 +157,13 @@ class _ValueAddedServicesBuyPageState extends State<ValueAddedServicesBuyPage> {
|
||||
children: [
|
||||
Text(
|
||||
"500条",
|
||||
style: TextStyle(fontSize: 36.sp),
|
||||
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
|
||||
),
|
||||
SizedBox(height: 10.h),
|
||||
Text(
|
||||
"¥50 (¥0.08/条)",
|
||||
style: TextStyle(fontSize: 32.sp),
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp, color: AppColors.placeholderTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
@ -6,84 +5,107 @@ import 'package:star_lock/app_settings/app_colors.dart';
|
||||
class ValueAddedServicesBuyAndUseRecordPage extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
const ValueAddedServicesBuyAndUseRecordPage({Key? key, required this.type}) : super(key: key);
|
||||
const ValueAddedServicesBuyAndUseRecordPage({Key? key, required this.type})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<ValueAddedServicesBuyAndUseRecordPage> createState() => _ValueAddedServicesBuyAndUseRecordPageState();
|
||||
State<ValueAddedServicesBuyAndUseRecordPage> createState() =>
|
||||
_ValueAddedServicesBuyAndUseRecordPageState();
|
||||
}
|
||||
|
||||
class _ValueAddedServicesBuyAndUseRecordPageState extends State<ValueAddedServicesBuyAndUseRecordPage> {
|
||||
class _ValueAddedServicesBuyAndUseRecordPageState
|
||||
extends State<ValueAddedServicesBuyAndUseRecordPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.builder(
|
||||
itemCount:20,
|
||||
itemBuilder: (c, index){
|
||||
if(index%2 == 0){
|
||||
itemCount: 20,
|
||||
itemBuilder: (c, index) {
|
||||
if (index % 2 == 0) {
|
||||
return _dateItem("2023-06-29");
|
||||
}else{
|
||||
return _operatingRecordItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
||||
} else {
|
||||
return _operatingRecordItem('images/controls_user.png', "张三",
|
||||
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget _dateItem(String lockDate){
|
||||
Widget _dateItem(String lockDate) {
|
||||
return Container(
|
||||
height: 70.h,
|
||||
height: 60.h,
|
||||
color: AppColors.mainBackgroundColor,
|
||||
padding: EdgeInsets.only(left:20.h, right: 20.h),
|
||||
padding: EdgeInsets.only(left: 20.h, right: 20.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(lockDate, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||
Text(
|
||||
lockDate,
|
||||
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _operatingRecordItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
|
||||
Widget _operatingRecordItem(String lockTypeIcon, String lockTypeTitle,
|
||||
String beginTime, String endTime, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 110.h,
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
height: 90.h,
|
||||
// padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
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: 20.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp, color: AppColors.blackColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height:10.h),
|
||||
SizedBox(height: 10.h),
|
||||
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: 20.sp,
|
||||
color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:20.h),
|
||||
SizedBox(width: 20.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:20.h),
|
||||
SizedBox(width: 20.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -11,58 +10,89 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
//高亮样式
|
||||
final TextStyle highStyle = TextStyle(color: const Color(0xFFEEDFA8), fontSize: 28.sp);
|
||||
final TextStyle highStyle =
|
||||
TextStyle(color: const Color(0xFFEEDFA8), fontSize: 20.sp);
|
||||
|
||||
//默认样式
|
||||
final TextStyle defaultStyle = TextStyle(color: Colors.black, fontSize: 28.sp);
|
||||
final TextStyle defaultStyle = TextStyle(color: Colors.black, fontSize: 20.sp);
|
||||
|
||||
//预览样式封装-密码
|
||||
InlineSpan emailPasswardSpan = TextSpan(children: [
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.hello!.tr},${TranslationLoader.lanKeys!.yourRoomIs!.tr}:', style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.roomName!.tr}', style: highStyle),
|
||||
TextSpan(text: ',${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr}:', style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.password!.tr}}', style: highStyle),
|
||||
TextSpan(text: '。${TranslationLoader.lanKeys!.periodValidity!.tr}:', style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.periodValidity!.tr}}', style: highStyle),
|
||||
TextSpan(text: '。${TranslationLoader.lanKeys!.templateTip1!.tr}。', style: defaultStyle),
|
||||
TextSpan(
|
||||
text:
|
||||
'${TranslationLoader.lanKeys!.hello!.tr},${TranslationLoader.lanKeys!.yourRoomIs!.tr}:',
|
||||
style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '{${TranslationLoader.lanKeys!.roomName!.tr}', style: highStyle),
|
||||
TextSpan(
|
||||
text: ',${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr}:',
|
||||
style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '{${TranslationLoader.lanKeys!.password!.tr}}', style: highStyle),
|
||||
TextSpan(
|
||||
text: '。${TranslationLoader.lanKeys!.periodValidity!.tr}:',
|
||||
style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '{${TranslationLoader.lanKeys!.periodValidity!.tr}}',
|
||||
style: highStyle),
|
||||
TextSpan(
|
||||
text: '。${TranslationLoader.lanKeys!.templateTip1!.tr}。',
|
||||
style: defaultStyle),
|
||||
]);
|
||||
|
||||
//预览样式封装-密码提示
|
||||
InlineSpan emailPasswardTipSpan = TextSpan(children: [
|
||||
TextSpan(text: TranslationLoader.lanKeys!.templateTip4!.tr, style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.roomName!.tr}}', style: highStyle),
|
||||
TextSpan(
|
||||
text: TranslationLoader.lanKeys!.templateTip4!.tr, style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '{${TranslationLoader.lanKeys!.roomName!.tr}}', style: highStyle),
|
||||
TextSpan(text: '、', style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.password!.tr}}', style: highStyle),
|
||||
TextSpan(text: TranslationLoader.lanKeys!.and!.tr, style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.periodValidity!.tr}}', style: highStyle),
|
||||
TextSpan(text: TranslationLoader.lanKeys!.willBeReplacedWithTheActualValue!.tr, style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '{${TranslationLoader.lanKeys!.password!.tr}}', style: highStyle),
|
||||
TextSpan(text: TranslationLoader.lanKeys!.and!.tr, style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '{${TranslationLoader.lanKeys!.periodValidity!.tr}}',
|
||||
style: highStyle),
|
||||
TextSpan(
|
||||
text: TranslationLoader.lanKeys!.willBeReplacedWithTheActualValue!.tr,
|
||||
style: defaultStyle),
|
||||
]);
|
||||
|
||||
String emaiPasswardStr = "${TranslationLoader.lanKeys!.hello!.tr},${TranslationLoader.lanKeys!.yourRoomIs!.tr}:{${TranslationLoader.lanKeys!.roomName!.tr}},${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr}:{${TranslationLoader.lanKeys!.password!.tr}}。${TranslationLoader.lanKeys!.periodValidity!.tr}:{${TranslationLoader.lanKeys!.periodValidity!.tr}}。${TranslationLoader.lanKeys!.templateTip1!.tr}";
|
||||
String emaiPasswardStr =
|
||||
"${TranslationLoader.lanKeys!.hello!.tr},${TranslationLoader.lanKeys!.yourRoomIs!.tr}:{${TranslationLoader.lanKeys!.roomName!.tr}},${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr}:{${TranslationLoader.lanKeys!.password!.tr}}。${TranslationLoader.lanKeys!.periodValidity!.tr}:{${TranslationLoader.lanKeys!.periodValidity!.tr}}。${TranslationLoader.lanKeys!.templateTip1!.tr}";
|
||||
|
||||
//预览样式封装-电子钥匙
|
||||
InlineSpan emailElectronicKeySpan = TextSpan(children: [
|
||||
TextSpan(text: TranslationLoader.lanKeys!.templateTip2!.tr, style: defaultStyle),
|
||||
TextSpan(
|
||||
text: TranslationLoader.lanKeys!.templateTip2!.tr, style: defaultStyle),
|
||||
TextSpan(text: 'https://abc.com/bcd', style: highStyle)
|
||||
]);
|
||||
|
||||
//预览样式封装-电子钥匙提示
|
||||
InlineSpan emailElectronicKeyTipSpan = TextSpan(children: [
|
||||
TextSpan(text: TranslationLoader.lanKeys!.templateTip4!.tr, style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.downloadLink!.tr}', style: highStyle),
|
||||
TextSpan(text: TranslationLoader.lanKeys!.willBeReplacedWithTheActualValue!.tr, style: defaultStyle),
|
||||
TextSpan(
|
||||
text: TranslationLoader.lanKeys!.templateTip4!.tr, style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '{${TranslationLoader.lanKeys!.downloadLink!.tr}',
|
||||
style: highStyle),
|
||||
TextSpan(
|
||||
text: TranslationLoader.lanKeys!.willBeReplacedWithTheActualValue!.tr,
|
||||
style: defaultStyle),
|
||||
]);
|
||||
|
||||
String emailElectronicKeyStr = "${TranslationLoader.lanKeys!.templateTip2!.tr}\n{${TranslationLoader.lanKeys!.downloadLink!.tr}}";
|
||||
String emailElectronicKeyStr =
|
||||
"${TranslationLoader.lanKeys!.templateTip2!.tr}\n{${TranslationLoader.lanKeys!.downloadLink!.tr}}";
|
||||
|
||||
class ValueAddedServicesAddEmailTemplatePage extends StatefulWidget {
|
||||
const ValueAddedServicesAddEmailTemplatePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ValueAddedServicesAddEmailTemplatePage> createState() => _ValueAddedServicesAddEmailTemplatePageState();
|
||||
State<ValueAddedServicesAddEmailTemplatePage> createState() =>
|
||||
_ValueAddedServicesAddEmailTemplatePageState();
|
||||
}
|
||||
|
||||
class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServicesAddEmailTemplatePage> {
|
||||
class _ValueAddedServicesAddEmailTemplatePageState
|
||||
extends State<ValueAddedServicesAddEmailTemplatePage> {
|
||||
final _templateOneTf = TextEditingController();
|
||||
final _templateNameTf = TextEditingController();
|
||||
|
||||
@ -77,34 +107,52 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.customMailTemplate!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.customMailTemplate!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
_buildEditTopInfo(),
|
||||
SizedBox(height: 10.h,),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
_buildEditTemplate(),
|
||||
SizedBox(height: 10.h,),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
_buildpreview(),
|
||||
SizedBox(height: 42.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||
borderRadius: 10.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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: (){
|
||||
onClick: () {
|
||||
// Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage);
|
||||
}
|
||||
),
|
||||
}),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildEditTopInfo() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(_templateNameTf, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.type!.tr, rightTitle:TranslationLoader.lanKeys!.password!.tr, isHaveLine: false, action:(){
|
||||
_showSeletTemplateType();
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
_templateNameTf, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.type!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.password!.tr,
|
||||
isHaveLine: false,
|
||||
action: () {
|
||||
_showSeletTemplateType();
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -117,8 +165,12 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 25.w, top: 25.h, bottom: 25.h, right: 25.w),
|
||||
child: Text(TranslationLoader.lanKeys!.templateContent!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w600),
|
||||
padding: EdgeInsets.only(
|
||||
left: 25.w, top: 25.h, bottom: 25.h, right: 25.w),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.templateContent!.tr,
|
||||
style:
|
||||
TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -127,32 +179,41 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
margin: EdgeInsets.only(left: 25.w, right: 25.w, bottom: 25.h),
|
||||
height: 100,
|
||||
child: TextField(
|
||||
maxLines:8,
|
||||
maxLines: 8,
|
||||
// maxLength:1000,
|
||||
textAlign: TextAlign.start,
|
||||
controller: _templateOneTf,
|
||||
style: TextStyle(color: Colors.black,fontSize: 28.sp,),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 28.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
contentPadding: EdgeInsets.only(
|
||||
top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
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,
|
||||
),
|
||||
@ -161,12 +222,13 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top:20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
margin: EdgeInsets.only( left: 15.w, right: 15.w, bottom: 15.h),
|
||||
padding: EdgeInsets.only(
|
||||
top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
margin: EdgeInsets.only(left: 15.w, right: 15.w, bottom: 15.h),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFbF9EC),
|
||||
borderRadius: BorderRadius.circular(10.h)),
|
||||
child:RichText(text: emailElectronicKeyTipSpan) ,
|
||||
child: RichText(text: emailElectronicKeyTipSpan),
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -175,27 +237,35 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
|
||||
Widget _buildpreview() {
|
||||
return Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.only(bottom: 20.h),
|
||||
child:Column(
|
||||
child: Column(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 25.w, top: 25.h, bottom: 25.h, right: 25.w),
|
||||
child: Text(TranslationLoader.lanKeys!.preview!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w600),
|
||||
padding: EdgeInsets.only(
|
||||
left: 25.w,
|
||||
top: 25.h,
|
||||
bottom: 25.h,
|
||||
right: 25.w),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.preview!.tr,
|
||||
style: TextStyle(fontSize: 20.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 25.w, right: 25.w, bottom: 20.h),
|
||||
padding: EdgeInsets.only(left: 20.w, top: 20.h, right: 20.w, bottom: 20.h),
|
||||
margin: EdgeInsets.only(
|
||||
left: 25.w, right: 25.w, bottom: 20.h),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w, top: 20.h, right: 20.w, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF5F5F5),
|
||||
borderRadius: BorderRadius.circular(10.h),
|
||||
@ -205,13 +275,11 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
)
|
||||
]
|
||||
);
|
||||
))
|
||||
]);
|
||||
}
|
||||
|
||||
Widget getTFWidget(TextEditingController tfController, String tfStr){
|
||||
Widget getTFWidget(TextEditingController tfController, String tfStr) {
|
||||
return Container(
|
||||
height: 50.h,
|
||||
width: 500.w,
|
||||
@ -223,7 +291,7 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
maxLines: 1,
|
||||
controller: tfController,
|
||||
autofocus: false,
|
||||
textAlign:TextAlign.end,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
@ -238,10 +306,13 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
);
|
||||
}
|
||||
|
||||
void _showSeletTemplateType(){
|
||||
var list = [TranslationLoader.lanKeys!.electronicKey!.tr, TranslationLoader.lanKeys!.password!.tr];
|
||||
void _showSeletTemplateType() {
|
||||
var list = [
|
||||
TranslationLoader.lanKeys!.electronicKey!.tr,
|
||||
TranslationLoader.lanKeys!.password!.tr
|
||||
];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
//上下文
|
||||
//上下文
|
||||
context,
|
||||
//默认的索引
|
||||
normalIndex: 0,
|
||||
@ -253,10 +324,6 @@ class _ValueAddedServicesAddEmailTemplatePageState extends State<ValueAddedServi
|
||||
//adapter: PickerAdapter(),
|
||||
data: list,
|
||||
//选择事件的回调
|
||||
clickCallBack: (int index, var str) {
|
||||
|
||||
}
|
||||
);
|
||||
clickCallBack: (int index, var str) {});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -14,15 +13,20 @@ class ValueAddedServicesListEmailTemplatePage extends StatefulWidget {
|
||||
const ValueAddedServicesListEmailTemplatePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ValueAddedServicesListEmailTemplatePage> createState() => _ValueAddedServicesListEmailTemplatePageState();
|
||||
State<ValueAddedServicesListEmailTemplatePage> createState() =>
|
||||
_ValueAddedServicesListEmailTemplatePageState();
|
||||
}
|
||||
|
||||
class _ValueAddedServicesListEmailTemplatePageState extends State<ValueAddedServicesListEmailTemplatePage> {
|
||||
class _ValueAddedServicesListEmailTemplatePageState
|
||||
extends State<ValueAddedServicesListEmailTemplatePage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.customMailTemplate!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.customMailTemplate!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
_topTipWidget(),
|
||||
@ -30,87 +34,104 @@ class _ValueAddedServicesListEmailTemplatePageState extends State<ValueAddedServ
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.creatingANewTemplate!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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.valueAddedServicesAddEmailTemplatePage);
|
||||
}
|
||||
),
|
||||
onClick: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.valueAddedServicesAddEmailTemplatePage);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 64.h,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _topTipWidget(){
|
||||
Widget _topTipWidget() {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
|
||||
padding: EdgeInsets.only(top:20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
padding:
|
||||
EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys!.customTemplatesTip!.tr),
|
||||
SizedBox(height: 15.h,),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top:15.h, left: 15.w, right: 15.w, bottom: 15.h),
|
||||
padding: EdgeInsets.only(
|
||||
top: 15.h, left: 15.w, right: 15.w, bottom: 15.h),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFbF9EC),
|
||||
borderRadius: BorderRadius.circular(10.h)),
|
||||
child:Row(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width:1.sw - 15.w*2 - 40.w*2 - 140.w,
|
||||
width: 1.sw - 15.w * 2 - 40.w * 2 - 140.w,
|
||||
// margin: EdgeInsets.only(top:15.h, left: 15.w, right: 15.w, bottom: 15.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("${TranslationLoader.lanKeys!.currentState!.tr}:${TranslationLoader.lanKeys!.onTrial!.tr}"),
|
||||
Text(TranslationLoader.lanKeys!.unHaveOpenedTip2!.tr)
|
||||
Text(
|
||||
"${TranslationLoader.lanKeys!.currentState!.tr}:${TranslationLoader.lanKeys!.onTrial!.tr}",
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp, fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(TranslationLoader.lanKeys!.unHaveOpenedTip2!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp, fontWeight: FontWeight.w600))
|
||||
],
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
Navigator.pushNamed(context, Routers.valueAddedServicesHighFunctionPage);
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.valueAddedServicesHighFunctionPage);
|
||||
},
|
||||
child: Container(
|
||||
width: 140.w,
|
||||
height: 70.h,
|
||||
width: 100.w,
|
||||
height: 50.h,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFCAB68D),
|
||||
borderRadius: BorderRadius.circular(35.h)
|
||||
),
|
||||
child: Center(child: Text(TranslationLoader.lanKeys!.goToTheOpen!.tr, textAlign: TextAlign.center, style: TextStyle(color: Colors.white)))
|
||||
),
|
||||
borderRadius: BorderRadius.circular(35.h)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.goToTheOpen!.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 20.sp)))),
|
||||
),
|
||||
],
|
||||
) ,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildMainUI(){
|
||||
Widget _buildMainUI() {
|
||||
return ListView.builder(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return _valueAddedServicesListSMSTemplateItem('images/icon_lock.png', "张三", (){
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _valueAddedServicesListSMSTemplateItem(
|
||||
'images/icon_lock.png', "张三", () {
|
||||
// Navigator.pushNamed(context, Routers.valueAddedServicesAddSMSTemplatePage);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget _valueAddedServicesListSMSTemplateItem(String title, String content, Function() action){
|
||||
Widget _valueAddedServicesListSMSTemplateItem(
|
||||
String title, String content, 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),
|
||||
),
|
||||
@ -118,8 +139,11 @@ class _ValueAddedServicesListEmailTemplatePageState extends State<ValueAddedServ
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left:30.h, top: 30.h, bottom: 20.h),
|
||||
child: Text("101", style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||
padding: EdgeInsets.only(left: 30.h, top: 30.h, bottom: 20.h),
|
||||
child: Text(
|
||||
"101",
|
||||
style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 25.w, right: 25.w, bottom: 25.h),
|
||||
@ -128,7 +152,8 @@ class _ValueAddedServicesListEmailTemplatePageState extends State<ValueAddedServ
|
||||
borderRadius: BorderRadius.circular(10.h),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 20.w, top: 20.h, right: 20.w, bottom: 20.h),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w, top: 20.h, right: 20.w, bottom: 20.h),
|
||||
child: RichText(text: emailElectronicKeySpan)),
|
||||
),
|
||||
],
|
||||
|
||||
@ -202,7 +202,7 @@ class _ValueAddedServicesHighFunctionPageState
|
||||
children: [
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
margin: EdgeInsets.only(left: 30.w, top: 50.h, right: 30.w),
|
||||
margin: EdgeInsets.only(left: 110.w, top: 50.h, right: 110.w),
|
||||
padding: EdgeInsets.only(left: 30.w),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Image.asset('images/mine/icon_mine_highFunctionContent_left.png',
|
||||
@ -234,8 +234,10 @@ class _ValueAddedServicesHighFunctionPageState
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 30.w, top: 30.h, right: 30.w, bottom: 30.h),
|
||||
child: Text(TranslationLoader
|
||||
.lanKeys!.tipsForBuyingAdvancedFeatures!.tr)),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.tipsForBuyingAdvancedFeatures!.tr,
|
||||
style: TextStyle(fontSize: 20.sp),
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 20.h),
|
||||
],
|
||||
@ -249,7 +251,7 @@ class _ValueAddedServicesHighFunctionPageState
|
||||
children: [
|
||||
Visibility(
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
height: 70.h,
|
||||
width: (1.sw - 20.w * 3) / 2,
|
||||
margin: EdgeInsets.only(left: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
@ -260,7 +262,7 @@ class _ValueAddedServicesHighFunctionPageState
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.freeTrial!.tr,
|
||||
style: TextStyle(fontSize: 34.sp),
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
)),
|
||||
),
|
||||
),
|
||||
@ -270,7 +272,7 @@ class _ValueAddedServicesHighFunctionPageState
|
||||
arguments: 4);
|
||||
},
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
height: 70.h,
|
||||
width: (1.sw - 20.w * 3) / 2,
|
||||
// width: 1.sw-20.w*2,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
@ -283,7 +285,7 @@ class _ValueAddedServicesHighFunctionPageState
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.openNow!.tr,
|
||||
style:
|
||||
TextStyle(fontSize: 34.sp, color: const Color(0xFFF9CEAC)),
|
||||
TextStyle(fontSize: 24.sp, color: const Color(0xFFF9CEAC)),
|
||||
)),
|
||||
),
|
||||
),
|
||||
|
||||
@ -103,10 +103,9 @@ class _ValueAddedServicesPageListState
|
||||
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),
|
||||
EdgeInsets.only(left: 20.w, right: 20.w, top: 16.h, bottom: 16.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
@ -114,8 +113,8 @@ class _ValueAddedServicesPageListState
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 60.w,
|
||||
height: 60.w,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
padding: EdgeInsets.all(12.h),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.mainColor,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -11,27 +10,41 @@ import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
//高亮样式
|
||||
final TextStyle highStyle = TextStyle(color: const Color(0xFFEEDFA8), fontSize: 28.sp);
|
||||
final TextStyle highStyle =
|
||||
TextStyle(color: const Color(0xFFEEDFA8), fontSize: 20.sp);
|
||||
|
||||
//默认样式
|
||||
final TextStyle defaultStyle = TextStyle(color: Colors.black, fontSize: 28.sp);
|
||||
final TextStyle defaultStyle = TextStyle(color: Colors.black, fontSize: 20.sp);
|
||||
|
||||
//预览样式封装-密码
|
||||
late InlineSpan passwardSpan = TextSpan(children: [
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.hello!.tr},\n${TranslationLoader.lanKeys!.yourRoomIs!.tr}:', style: defaultStyle),
|
||||
TextSpan(
|
||||
text:
|
||||
'${TranslationLoader.lanKeys!.hello!.tr},\n${TranslationLoader.lanKeys!.yourRoomIs!.tr}:',
|
||||
style: defaultStyle),
|
||||
TextSpan(text: '201', style: highStyle),
|
||||
TextSpan(text: ' ${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr}: ', style: defaultStyle),
|
||||
TextSpan(
|
||||
text: ' ${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr}: ',
|
||||
style: defaultStyle),
|
||||
TextSpan(text: '332211\n', style: highStyle),
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.periodValidity!.tr}: ', style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '${TranslationLoader.lanKeys!.periodValidity!.tr}: ',
|
||||
style: defaultStyle),
|
||||
TextSpan(text: '2021.12.11 12:00 - 2021.12.12 13:00。\n', style: highStyle),
|
||||
TextSpan(text: TranslationLoader.lanKeys!.templateTip1!.tr, style: defaultStyle),
|
||||
TextSpan(
|
||||
text: TranslationLoader.lanKeys!.templateTip1!.tr, style: defaultStyle),
|
||||
]);
|
||||
|
||||
//预览样式封装-密码
|
||||
late InlineSpan electronicKeySpan = TextSpan(children: [
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.hello!.tr},\n${TranslationLoader.lanKeys!.templateTip2!.tr}', style: defaultStyle),
|
||||
TextSpan(
|
||||
text:
|
||||
'${TranslationLoader.lanKeys!.hello!.tr},\n${TranslationLoader.lanKeys!.templateTip2!.tr}',
|
||||
style: defaultStyle),
|
||||
TextSpan(text: 'https://abc.com/bcd\n', style: highStyle),
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.templateTip3!.tr}\n', style: defaultStyle),
|
||||
TextSpan(
|
||||
text: '${TranslationLoader.lanKeys!.templateTip3!.tr}\n',
|
||||
style: defaultStyle),
|
||||
TextSpan(text: 'https://abc.com/bcd', style: highStyle),
|
||||
]);
|
||||
|
||||
@ -39,12 +52,12 @@ class ValueAddedServicesAddSMSTemplatePage extends StatefulWidget {
|
||||
const ValueAddedServicesAddSMSTemplatePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ValueAddedServicesAddSMSTemplatePage> createState() => _ValueAddedServicesAddSMSTemplatePageState();
|
||||
State<ValueAddedServicesAddSMSTemplatePage> createState() =>
|
||||
_ValueAddedServicesAddSMSTemplatePageState();
|
||||
}
|
||||
|
||||
class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedServicesAddSMSTemplatePage> {
|
||||
|
||||
|
||||
class _ValueAddedServicesAddSMSTemplatePageState
|
||||
extends State<ValueAddedServicesAddSMSTemplatePage> {
|
||||
final _templateOneTf = TextEditingController();
|
||||
final _templateTwoTf = TextEditingController();
|
||||
final _templateNameTf = TextEditingController();
|
||||
@ -61,34 +74,55 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.customSMSTemplate!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.customSMSTemplate!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
_buildEditTopInfo(),
|
||||
SizedBox(height: 10.h,),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
_buildEditTemplate(),
|
||||
SizedBox(height: 10.h,),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
_buildpreview(),
|
||||
SizedBox(height: 42.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||
borderRadius: 10.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);
|
||||
}
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||
borderRadius: 10.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);
|
||||
}),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildEditTopInfo() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(_templateNameTf, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.type!.tr, rightTitle:TranslationLoader.lanKeys!.password!.tr, isHaveLine: false, action:(){
|
||||
_showSeletTemplateType();
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
_templateNameTf, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.type!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.password!.tr,
|
||||
isHaveLine: false,
|
||||
action: () {
|
||||
_showSeletTemplateType();
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -101,8 +135,12 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 25.w, top: 25.h, bottom: 25.h, right: 25.w),
|
||||
child: Text(TranslationLoader.lanKeys!.templateContent!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w600),
|
||||
padding: EdgeInsets.only(
|
||||
left: 25.w, top: 25.h, bottom: 25.h, right: 25.w),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.templateContent!.tr,
|
||||
style:
|
||||
TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -111,32 +149,41 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
margin: EdgeInsets.only(left: 25.w, right: 25.w, bottom: 25.h),
|
||||
height: 100,
|
||||
child: TextField(
|
||||
maxLines:8,
|
||||
maxLines: 8,
|
||||
// maxLength:1000,
|
||||
textAlign: TextAlign.start,
|
||||
controller: _templateOneTf,
|
||||
style: TextStyle(color: Colors.black,fontSize: 28.sp,),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 20.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
contentPadding: EdgeInsets.only(
|
||||
top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
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,
|
||||
),
|
||||
@ -147,16 +194,32 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 25.w, top: 10.h, right: 25.w),
|
||||
child: RichText(text: TextSpan(children: [
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.yourRoomIs!.tr}: ', style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.roomName!.tr}}', style: highStyle),
|
||||
TextSpan(text: ' ${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr}: ', style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.password!.tr}}', style: highStyle),
|
||||
padding:
|
||||
EdgeInsets.only(left: 25.w, top: 10.h, right: 25.w),
|
||||
child: RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'${TranslationLoader.lanKeys!.yourRoomIs!.tr}: ',
|
||||
style: defaultStyle),
|
||||
TextSpan(
|
||||
text:
|
||||
'{${TranslationLoader.lanKeys!.roomName!.tr}}',
|
||||
style: highStyle),
|
||||
TextSpan(
|
||||
text:
|
||||
' ${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr}: ',
|
||||
style: defaultStyle),
|
||||
TextSpan(
|
||||
text:
|
||||
'{${TranslationLoader.lanKeys!.password!.tr}}',
|
||||
style: highStyle),
|
||||
]))),
|
||||
],
|
||||
),
|
||||
@ -165,17 +228,32 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 25.w, top: 10.h),
|
||||
child: RichText(text: TextSpan(children: [
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.periodValidity!.tr}: ', style: defaultStyle),
|
||||
TextSpan(text: '{${TranslationLoader.lanKeys!.periodValidity!.tr}}', style: highStyle),
|
||||
]))
|
||||
child: RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'${TranslationLoader.lanKeys!.periodValidity!.tr}: ',
|
||||
style: defaultStyle),
|
||||
TextSpan(
|
||||
text:
|
||||
'{${TranslationLoader.lanKeys!.periodValidity!.tr}}',
|
||||
style: highStyle),
|
||||
]))),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
SizedBox(width: 10.w,),
|
||||
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,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -183,19 +261,32 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
),
|
||||
Visibility(
|
||||
visible: false,
|
||||
child: Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 25.w, top: 10.h, right: 25.w),
|
||||
child: RichText(text: TextSpan(children: [
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.templateTip2!.tr}\n', style: defaultStyle),
|
||||
TextSpan(text: 'https://abc.com/bcd\n', style: highStyle),
|
||||
TextSpan(text: '${TranslationLoader.lanKeys!.templateTip3!.tr}\n', style: defaultStyle),
|
||||
TextSpan(text: 'https://abc.com/bcd\n', style: highStyle),
|
||||
]))
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(left: 25.w, top: 10.h, right: 25.w),
|
||||
child: RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'${TranslationLoader.lanKeys!.templateTip2!.tr}\n',
|
||||
style: defaultStyle),
|
||||
TextSpan(
|
||||
text: 'https://abc.com/bcd\n',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFEEDFA8), fontSize: 20.sp)),
|
||||
TextSpan(
|
||||
text:
|
||||
'${TranslationLoader.lanKeys!.templateTip3!.tr}\n',
|
||||
style: defaultStyle),
|
||||
TextSpan(
|
||||
text: 'https://abc.com/bcd\n',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFEEDFA8), fontSize: 20.sp)),
|
||||
]))),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.h),
|
||||
Container(
|
||||
@ -205,32 +296,41 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
alignment: Alignment.bottomRight,
|
||||
children: [
|
||||
TextField(
|
||||
maxLines:8,
|
||||
maxLines: 8,
|
||||
// maxLength:1000,
|
||||
textAlign: TextAlign.start,
|
||||
controller: _templateTwoTf,
|
||||
style: TextStyle(color: Colors.black,fontSize: 28.sp,),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 20.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
contentPadding: EdgeInsets.only(
|
||||
top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
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,
|
||||
),
|
||||
@ -247,56 +347,98 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
|
||||
Widget _buildpreview() {
|
||||
return Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.only(bottom: 20.h),
|
||||
child:Column(
|
||||
children: [
|
||||
Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.only(bottom: 20.h),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 25.w, top: 25.h, bottom: 25.h, right: 25.w),
|
||||
child: Text(TranslationLoader.lanKeys!.preview!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 25.w, right: 25.w),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF5F5F5),
|
||||
borderRadius: BorderRadius.circular(10.h),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 20.w, top: 20.h, right: 20.w, bottom: 20.h),
|
||||
child: RichText(text: passwardSpan)),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 25.w, top: 25.h, bottom: 25.h, right: 25.w),
|
||||
child: Text('${TranslationLoader.lanKeys!.expectedNotoCount!.tr}:2', style: TextStyle(color: Colors.grey, fontSize: 26.sp,),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 25.w,
|
||||
top: 25.h,
|
||||
bottom: 25.h,
|
||||
right: 25.w),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.preview!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 25.w, right: 25.w),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF5F5F5),
|
||||
borderRadius: BorderRadius.circular(10.h),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w,
|
||||
top: 20.h,
|
||||
right: 20.w,
|
||||
bottom: 20.h),
|
||||
child: RichText(text: passwardSpan)),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 25.w,
|
||||
top: 25.h,
|
||||
bottom: 25.h,
|
||||
),
|
||||
child: Text(
|
||||
'${TranslationLoader.lanKeys!.expectedNotoCount!.tr}:2',
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 20.sp,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
/*
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
// left: 25.w,
|
||||
top: 25.h,
|
||||
bottom: 25.h,
|
||||
),
|
||||
child: Text(
|
||||
'${TranslationLoader.lanKeys!.expectedNotoCount!.tr}:2',
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 20.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
*/
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
)
|
||||
]
|
||||
);
|
||||
))
|
||||
]);
|
||||
}
|
||||
|
||||
Widget getTFWidget(TextEditingController tfController, String tfStr){
|
||||
Widget getTFWidget(TextEditingController tfController, String tfStr) {
|
||||
return Container(
|
||||
height: 50.h,
|
||||
width: 500.w,
|
||||
width: 300.w,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@ -305,11 +447,12 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
maxLines: 1,
|
||||
controller: tfController,
|
||||
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,
|
||||
),
|
||||
@ -320,10 +463,13 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
);
|
||||
}
|
||||
|
||||
void _showSeletTemplateType(){
|
||||
var list = [TranslationLoader.lanKeys!.electronicKey!.tr, TranslationLoader.lanKeys!.password!.tr];
|
||||
void _showSeletTemplateType() {
|
||||
var list = [
|
||||
TranslationLoader.lanKeys!.electronicKey!.tr,
|
||||
TranslationLoader.lanKeys!.password!.tr
|
||||
];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
//上下文
|
||||
//上下文
|
||||
context,
|
||||
//默认的索引
|
||||
normalIndex: 0,
|
||||
@ -335,10 +481,6 @@ class _ValueAddedServicesAddSMSTemplatePageState extends State<ValueAddedService
|
||||
//adapter: PickerAdapter(),
|
||||
data: list,
|
||||
//选择事件的回调
|
||||
clickCallBack: (int index, var str) {
|
||||
|
||||
}
|
||||
);
|
||||
clickCallBack: (int index, var str) {});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -14,15 +13,20 @@ class ValueAddedServicesListSMSTemplatePage extends StatefulWidget {
|
||||
const ValueAddedServicesListSMSTemplatePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ValueAddedServicesListSMSTemplatePage> createState() => _ValueAddedServicesListSMSTemplatePageState();
|
||||
State<ValueAddedServicesListSMSTemplatePage> createState() =>
|
||||
_ValueAddedServicesListSMSTemplatePageState();
|
||||
}
|
||||
|
||||
class _ValueAddedServicesListSMSTemplatePageState extends State<ValueAddedServicesListSMSTemplatePage> {
|
||||
class _ValueAddedServicesListSMSTemplatePageState
|
||||
extends State<ValueAddedServicesListSMSTemplatePage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.customSMSTemplate!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.customSMSTemplate!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
_topTipWidget(),
|
||||
@ -30,87 +34,107 @@ class _ValueAddedServicesListSMSTemplatePageState extends State<ValueAddedServic
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.creatingANewTemplate!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.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.valueAddedServicesAddSMSTemplatePage);
|
||||
}
|
||||
),
|
||||
onClick: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.valueAddedServicesAddSMSTemplatePage);
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _topTipWidget(){
|
||||
Widget _topTipWidget() {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
|
||||
padding: EdgeInsets.only(top:20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys!.customTemplatesTip!.tr),
|
||||
SizedBox(height: 15.h,),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top:15.h, left: 15.w, right: 15.w, bottom: 15.h),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFbF9EC),
|
||||
borderRadius: BorderRadius.circular(10.h)),
|
||||
child:Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width:1.sw - 15.w*2 - 40.w*2 - 140.w,
|
||||
// margin: EdgeInsets.only(top:15.h, left: 15.w, right: 15.w, bottom: 15.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("${TranslationLoader.lanKeys!.currentState!.tr}:${TranslationLoader.lanKeys!.onTrial!.tr}"),
|
||||
Text(TranslationLoader.lanKeys!.unHaveOpenedTip2!.tr)
|
||||
],
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
padding:
|
||||
EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
TranslationLoader.lanKeys!.customTemplatesTip!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
color: AppColors.blackColor,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: 15.h, left: 15.w, right: 15.w, bottom: 15.h),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFbF9EC),
|
||||
borderRadius: BorderRadius.circular(10.h)),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 1.sw - 15.w * 2 - 40.w * 2 - 140.w,
|
||||
// margin: EdgeInsets.only(top:15.h, left: 15.w, right: 15.w, bottom: 15.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${TranslationLoader.lanKeys!.currentState!.tr}:${TranslationLoader.lanKeys!.onTrial!.tr}",
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp, fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(TranslationLoader.lanKeys!.unHaveOpenedTip2!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp, fontWeight: FontWeight.w600))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
Navigator.pushNamed(context, Routers.valueAddedServicesHighFunctionPage);
|
||||
},
|
||||
child: Container(
|
||||
width: 140.w,
|
||||
height: 70.h,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFCAB68D),
|
||||
borderRadius: BorderRadius.circular(35.h)
|
||||
),
|
||||
child: Center(child: Text(TranslationLoader.lanKeys!.goToTheOpen!.tr, textAlign: TextAlign.center, style: TextStyle(color: Colors.white)))
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.valueAddedServicesHighFunctionPage);
|
||||
},
|
||||
child: Container(
|
||||
width: 100.w,
|
||||
height: 50.h,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFCAB68D),
|
||||
borderRadius: BorderRadius.circular(35.h)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.goToTheOpen!.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 20.sp)))),
|
||||
),
|
||||
),
|
||||
],
|
||||
) ,
|
||||
)
|
||||
],
|
||||
)
|
||||
);
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildMainUI(){
|
||||
Widget _buildMainUI() {
|
||||
return ListView.builder(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return _valueAddedServicesListSMSTemplateItem('images/icon_lock.png', "张三", (){
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _valueAddedServicesListSMSTemplateItem(
|
||||
'images/icon_lock.png', "张三", () {
|
||||
// Navigator.pushNamed(context, Routers.valueAddedServicesAddSMSTemplatePage);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget _valueAddedServicesListSMSTemplateItem(String title, String content, Function() action){
|
||||
Widget _valueAddedServicesListSMSTemplateItem(
|
||||
String title, String content, 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),
|
||||
),
|
||||
@ -118,8 +142,11 @@ class _ValueAddedServicesListSMSTemplatePageState extends State<ValueAddedServic
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left:30.h, top: 30.h, bottom: 20.h),
|
||||
child: Text("101", style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||
padding: EdgeInsets.only(left: 30.h, top: 30.h, bottom: 20.h),
|
||||
child: Text(
|
||||
"101",
|
||||
style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 25.w, right: 25.w, bottom: 25.h),
|
||||
@ -128,7 +155,8 @@ class _ValueAddedServicesListSMSTemplatePageState extends State<ValueAddedServic
|
||||
borderRadius: BorderRadius.circular(10.h),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 20.w, top: 20.h, right: 20.w, bottom: 20.h),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w, top: 20.h, right: 20.w, bottom: 20.h),
|
||||
child: RichText(text: electronicKeySpan)),
|
||||
),
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user