2025.9.18 增加120字限制
parent
76d0fdbd16
commit
1c026d31f1
|
|
@ -28,6 +28,7 @@ class ItemListWidget {
|
||||||
ValueChanged<String>? onChanged,
|
ValueChanged<String>? onChanged,
|
||||||
ValueChanged<String>? onFieldSubmitted,
|
ValueChanged<String>? onFieldSubmitted,
|
||||||
int maxLines = 5,
|
int maxLines = 5,
|
||||||
|
bool showMaxLength = false,
|
||||||
|
|
||||||
// 新增参数:数字输入控制
|
// 新增参数:数字输入控制
|
||||||
bool isNumericInput = false, // 是否为数字输入
|
bool isNumericInput = false, // 是否为数字输入
|
||||||
|
|
@ -75,6 +76,7 @@ class ItemListWidget {
|
||||||
onChanged: onChanged,
|
onChanged: onChanged,
|
||||||
onSubmitted: onFieldSubmitted,
|
onSubmitted: onFieldSubmitted,
|
||||||
keyboardType: actualKeyboardType,
|
keyboardType: actualKeyboardType,
|
||||||
|
maxLength: showMaxLength?120:null,
|
||||||
style: TextStyle(fontSize: fontSize),
|
style: TextStyle(fontSize: fontSize),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
// 添加输入格式化器(如果是数字输入)
|
// 添加输入格式化器(如果是数字输入)
|
||||||
|
|
|
||||||
|
|
@ -373,6 +373,7 @@ class _HotworkSafeFuncSureState extends State<HotworkSafeFuncSure> {
|
||||||
ItemListWidget.singleLineTitleText(
|
ItemListWidget.singleLineTitleText(
|
||||||
|
|
||||||
label: '其他安全措施:',
|
label: '其他安全措施:',
|
||||||
|
showMaxLength:true,
|
||||||
isEditable: true,
|
isEditable: true,
|
||||||
hintText: '请输入其他安全措施',
|
hintText: '请输入其他安全措施',
|
||||||
controller: _otherController,
|
controller: _otherController,
|
||||||
|
|
|
||||||
|
|
@ -426,6 +426,7 @@ class _CutroadSafeFuncSureState extends State<CutroadSafeFuncSure> {
|
||||||
ItemListWidget.singleLineTitleText(
|
ItemListWidget.singleLineTitleText(
|
||||||
|
|
||||||
label: '其他安全措施:',
|
label: '其他安全措施:',
|
||||||
|
showMaxLength:true,
|
||||||
isEditable: true,
|
isEditable: true,
|
||||||
hintText: '请输入其他安全措施',
|
hintText: '请输入其他安全措施',
|
||||||
controller: _otherController,
|
controller: _otherController,
|
||||||
|
|
|
||||||
|
|
@ -385,6 +385,7 @@ class _BreakgroundSafeFuncSureState extends State<BreakgroundSafeFuncSure> {
|
||||||
ItemListWidget.singleLineTitleText(
|
ItemListWidget.singleLineTitleText(
|
||||||
|
|
||||||
label: '其他安全措施:',
|
label: '其他安全措施:',
|
||||||
|
showMaxLength:true,
|
||||||
isEditable: true,
|
isEditable: true,
|
||||||
hintText: '请输入其他安全措施',
|
hintText: '请输入其他安全措施',
|
||||||
controller: _otherController,
|
controller: _otherController,
|
||||||
|
|
|
||||||
|
|
@ -384,6 +384,7 @@ class _HoistworkSafeFuncSureState extends State<HoistworkSafeFuncSure> {
|
||||||
ItemListWidget.singleLineTitleText(
|
ItemListWidget.singleLineTitleText(
|
||||||
|
|
||||||
label: '其他安全措施:',
|
label: '其他安全措施:',
|
||||||
|
showMaxLength:true,
|
||||||
isEditable: true,
|
isEditable: true,
|
||||||
hintText: '请输入其他安全措施',
|
hintText: '请输入其他安全措施',
|
||||||
controller: _otherController,
|
controller: _otherController,
|
||||||
|
|
|
||||||
|
|
@ -373,6 +373,7 @@ class _HighworkSafeFuncSureState extends State<HighworkSafeFuncSure> {
|
||||||
|
|
||||||
label: '其他安全措施:',
|
label: '其他安全措施:',
|
||||||
isEditable: true,
|
isEditable: true,
|
||||||
|
showMaxLength:true,
|
||||||
hintText: '请输入其他安全措施',
|
hintText: '请输入其他安全措施',
|
||||||
controller: _otherController,
|
controller: _otherController,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -374,6 +374,7 @@ class _ElectricitySafeFuncSureState extends State<ElectricitySafeFuncSure> {
|
||||||
ItemListWidget.singleLineTitleText(
|
ItemListWidget.singleLineTitleText(
|
||||||
|
|
||||||
label: '其他安全措施:',
|
label: '其他安全措施:',
|
||||||
|
showMaxLength:true,
|
||||||
isEditable: true,
|
isEditable: true,
|
||||||
hintText: '请输入其他安全措施',
|
hintText: '请输入其他安全措施',
|
||||||
controller: _otherController,
|
controller: _otherController,
|
||||||
|
|
|
||||||
|
|
@ -387,6 +387,7 @@ class _BlindboardSafeFuncSureState extends State<BlindboardSafeFuncSure> {
|
||||||
ItemListWidget.singleLineTitleText(
|
ItemListWidget.singleLineTitleText(
|
||||||
|
|
||||||
label: '其他安全措施:',
|
label: '其他安全措施:',
|
||||||
|
showMaxLength:true,
|
||||||
isEditable: true,
|
isEditable: true,
|
||||||
hintText: '请输入其他安全措施',
|
hintText: '请输入其他安全措施',
|
||||||
controller: _otherController,
|
controller: _otherController,
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,7 @@ class _SpaceworkSafeFuncSureState extends State<SpaceworkSafeFuncSure> {
|
||||||
ItemListWidget.singleLineTitleText(
|
ItemListWidget.singleLineTitleText(
|
||||||
|
|
||||||
label: '其他安全措施:',
|
label: '其他安全措施:',
|
||||||
|
showMaxLength:true,
|
||||||
isEditable: true,
|
isEditable: true,
|
||||||
hintText: '请输入其他安全措施',
|
hintText: '请输入其他安全措施',
|
||||||
controller: _otherController,
|
controller: _otherController,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue