设备名称 人员名称 显示长度限制
This commit is contained in:
@@ -210,12 +210,6 @@ class _EditBedPageState extends State<EditBedPage> {
|
||||
textAlign: TextAlign.center,
|
||||
textAlignVertical:
|
||||
TextAlignVertical.center,
|
||||
maxLength: AppConstants().text_length,
|
||||
buildCounter: (_,
|
||||
{int? currentLength,
|
||||
bool? isFocused,
|
||||
int? maxLength}) =>
|
||||
null,
|
||||
decoration: InputDecoration(
|
||||
hintText: "请输入设备的名称".tr,
|
||||
contentPadding:
|
||||
@@ -262,101 +256,16 @@ class _EditBedPageState extends State<EditBedPage> {
|
||||
letterSpacing: 0,
|
||||
),
|
||||
cursorColor: Colors.white,
|
||||
),
|
||||
|
||||
// 自定义右下角计数器
|
||||
Positioned(
|
||||
bottom: 2.rpx,
|
||||
right: 10.rpx,
|
||||
child: Text(
|
||||
'${_nameController.text.characters.length} / ${AppConstants().text_length}',
|
||||
style: TextStyle(
|
||||
fontSize: 24.rpx,
|
||||
color: const Color(0xFF929699),
|
||||
fontFamily: 'Readex Pro',
|
||||
),
|
||||
),
|
||||
// ✅ 允许横向滚动防止溢出:
|
||||
keyboardType: TextInputType.text,
|
||||
maxLines: 1,
|
||||
scrollPadding: EdgeInsets.zero,
|
||||
enableInteractiveSelection: true,
|
||||
expands: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Container(
|
||||
// alignment: Alignment.center,
|
||||
// height: bodysize!.maxHeight * 0.076,
|
||||
// decoration: const BoxDecoration(
|
||||
// border: Border(
|
||||
// bottom: BorderSide(
|
||||
// color: Color(0xFF929699),
|
||||
// width: 0))),
|
||||
// child: TextFormField(
|
||||
// // autofocus: true,
|
||||
// controller: _nameController,
|
||||
// obscureText: false,
|
||||
// onChanged: (val) {
|
||||
// editedData['name'] = val;
|
||||
// },
|
||||
// textAlign: TextAlign.center,
|
||||
// maxLength: AppConstants().text_length,
|
||||
// decoration: InputDecoration(
|
||||
// hintText: "请输入设备的名称".tr,
|
||||
// contentPadding:
|
||||
// const EdgeInsetsDirectional
|
||||
// .fromSTEB(10, 0, 10, 0),
|
||||
// labelStyle: TextStyle(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// letterSpacing: 0,
|
||||
// fontSize: 36.rpx, // 设置输入文字大小
|
||||
// color: Colors.white, // 设置输入文字颜色
|
||||
// ),
|
||||
// hintStyle: TextStyle(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// letterSpacing: 0,
|
||||
// color: Color(0xFF929699),
|
||||
// fontSize: 36.rpx,
|
||||
// ),
|
||||
// enabledBorder: UnderlineInputBorder(
|
||||
// borderSide: const BorderSide(
|
||||
// color: Color(0x00000000),
|
||||
// width: 2,
|
||||
// ),
|
||||
// borderRadius:
|
||||
// BorderRadius.circular(8),
|
||||
// ),
|
||||
// focusedBorder: UnderlineInputBorder(
|
||||
// borderSide: const BorderSide(
|
||||
// color: Color(0x00000000),
|
||||
// width: 2,
|
||||
// ),
|
||||
// borderRadius:
|
||||
// BorderRadius.circular(8),
|
||||
// ),
|
||||
// errorBorder: UnderlineInputBorder(
|
||||
// borderSide: const BorderSide(
|
||||
// color: Color(0x00000000),
|
||||
// width: 2,
|
||||
// ),
|
||||
// borderRadius:
|
||||
// BorderRadius.circular(8),
|
||||
// ),
|
||||
// focusedErrorBorder:
|
||||
// UnderlineInputBorder(
|
||||
// borderSide: const BorderSide(
|
||||
// color: Color(0x00000000),
|
||||
// width: 2,
|
||||
// ),
|
||||
// borderRadius:
|
||||
// BorderRadius.circular(8),
|
||||
// ),
|
||||
// ),
|
||||
// style: TextStyle(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// letterSpacing: 0,
|
||||
// color: Colors.white,
|
||||
// fontSize: 36.rpx,
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user