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