新建短信模版、邮件模版修复名称应限制50位位数,可分3行全部显示出来,应不能重名问题
This commit is contained in:
parent
b823b25199
commit
d4437f0ed9
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
@ -28,7 +29,7 @@ class _NewSMSTemplatePageState extends State<NewSMSTemplatePage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: state.templateType == 1 ? '新建短信模版'.tr : '新建邮件模版'.tr,
|
||||
barTitle: state.templateType.value == 1 ? '新建短信模版'.tr : '新建邮件模版'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
@ -222,26 +223,32 @@ class _NewSMSTemplatePageState extends State<NewSMSTemplatePage> {
|
||||
|
||||
Widget getTFWidget(TextEditingController tfController, String tfStr) {
|
||||
return SizedBox(
|
||||
height: 50.h,
|
||||
width: 300.w,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TextField(
|
||||
maxLines: 1,
|
||||
controller: tfController,
|
||||
autofocus: false,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
hintText: tfStr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
height: 65.h,
|
||||
width: 320.w,
|
||||
child: TextField(
|
||||
controller: tfController, //输入框一行
|
||||
maxLines: 3,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
FilteringTextInputFormatter.deny('\n'),
|
||||
LengthLimitingTextInputFormatter(50),
|
||||
],
|
||||
autofocus: false,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
hintText: tfStr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
disabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
border: const OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
contentPadding: EdgeInsets.only(top: 20.h, bottom: 0)),
|
||||
style:
|
||||
TextStyle(fontSize: 22.sp, textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user