fix:开锁页-电子钥匙、授权管理员 输入姓名30位,通通锁50位。另在详情页姓名显示不全,通通锁会显示3行
This commit is contained in:
parent
4f75d1a43a
commit
5baa5830ac
@ -196,7 +196,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
onTap: action,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
height: 100.h,
|
||||
padding: EdgeInsets.only(top: 20.h, bottom: 20.h),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(width: 30.w),
|
||||
@ -226,7 +226,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Text(receiveUser,
|
||||
maxLines: 1,
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
|
||||
@ -44,7 +44,8 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||
isHaveRightWidget: true,
|
||||
setHeight: false,
|
||||
rightWidget: getTFWidget(
|
||||
'(${TranslationLoader.lanKeys!.mustFillIn!.tr})')),
|
||||
'(${TranslationLoader.lanKeys!.mustFillIn!.tr})',
|
||||
maxSize: 50)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.startDate!.tr,
|
||||
rightTitle: state.beginDate.value.isEmpty
|
||||
@ -123,7 +124,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget getTFWidget(String tfStr) {
|
||||
Widget getTFWidget(String tfStr, {int maxSize = 30}) {
|
||||
return Expanded(
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
@ -143,7 +144,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||
isCollapsed: true,
|
||||
),
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
LengthLimitingTextInputFormatter(maxSize),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -433,6 +433,8 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
name!,
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
),
|
||||
),
|
||||
|
||||
@ -245,7 +245,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
onTap: action,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
height: 90.h,
|
||||
padding: EdgeInsets.only(top: 20.h, bottom: 20.h),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(width: 30.w),
|
||||
@ -262,11 +262,6 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// Image.asset(
|
||||
// avatarURL,
|
||||
// width: 60.w,
|
||||
// height: 60.w,
|
||||
// ),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@ -281,7 +276,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Text(receiveUser,
|
||||
maxLines: 1,
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_page.dart';
|
||||
|
||||
import '../../../../../tools/CustomUnderlineTabIndicator.dart';
|
||||
@ -18,8 +19,8 @@ class SendElectronicKeyPage extends StatefulWidget {
|
||||
|
||||
class _SendElectronicKeyPageState extends State<SendElectronicKeyPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
final logic = Get.put(SendElectronicKeyLogic());
|
||||
final state = Get.find<SendElectronicKeyLogic>().state;
|
||||
final SendElectronicKeyLogic logic = Get.put(SendElectronicKeyLogic());
|
||||
final SendElectronicKeyState state = Get.find<SendElectronicKeyLogic>().state;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -37,7 +38,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage>
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
@ -48,10 +49,10 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage>
|
||||
TabBar _tabBar() {
|
||||
return TabBar(
|
||||
controller: state.tabController,
|
||||
onTap: (index) {
|
||||
onTap: (int index) {
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
},
|
||||
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
|
||||
tabs: _itemTabs.map(_tab).toList(),
|
||||
isScrollable: true,
|
||||
indicatorColor: Colors.red,
|
||||
unselectedLabelColor: Colors.black,
|
||||
@ -97,10 +98,10 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage>
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "3"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: '1'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: '2'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: '3'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +143,8 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2, logic)),
|
||||
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2, logic,
|
||||
maxSize: 50)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
@ -441,7 +442,8 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
|
||||
// 接受者信息输入框
|
||||
Widget getTFWidget(bool isHaveBtn, String tfStr, int lineIndex,
|
||||
SendElectronicKeyViewLogic logic) {
|
||||
SendElectronicKeyViewLogic logic,
|
||||
{int maxSize = 30}) {
|
||||
return SizedBox(
|
||||
height: 65.h,
|
||||
width: 320.w,
|
||||
@ -454,7 +456,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
maxLines: 1,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
FilteringTextInputFormatter.deny('\n'),
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
LengthLimitingTextInputFormatter(maxSize),
|
||||
],
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
@ -124,6 +124,23 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
// decoration: BoxDecoration(
|
||||
// // 设置渐变
|
||||
// gradient: LinearGradient(
|
||||
// // 渐变颜色列表
|
||||
// colors: [
|
||||
// AppColors.mainColor.withOpacity(0.8), // 左上角颜色
|
||||
// AppColors.mainColor.withOpacity(0.4), // 右上角颜色
|
||||
// Colors.white, // 右下角颜色
|
||||
// Colors.white, // 左下角颜色
|
||||
// ],
|
||||
// // 渐变的起始和结束位置
|
||||
// begin: Alignment.topLeft,
|
||||
// end: Alignment.bottomRight,
|
||||
// // 颜色停靠点,对应颜色数组的索引位置
|
||||
// stops: [0.0, 0.23, 0.47, 1],
|
||||
// ),
|
||||
// ),
|
||||
child: child,
|
||||
));
|
||||
return child;
|
||||
@ -215,12 +232,15 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
||||
SizedBox(
|
||||
height: 160.h,
|
||||
),
|
||||
if (F.isLite) Container() else SubmitBtn(
|
||||
btnName: '演示模式',
|
||||
onClick: () {
|
||||
Get.toNamed(Routers.demoModeLockDetailPage);
|
||||
},
|
||||
)
|
||||
if (F.isLite)
|
||||
Container()
|
||||
else
|
||||
SubmitBtn(
|
||||
btnName: '演示模式',
|
||||
onClick: () {
|
||||
Get.toNamed(Routers.demoModeLockDetailPage);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user