【问题标题】:I want to delete this field from the flutter application, what should I do?我想从flutter应用中删除这个字段,我该怎么办?
【发布时间】:2021-04-18 02:32:13
【问题描述】:

这是我要从中删除字段的代码 -

setPincode() {
  return TextFormField(
    keyboardType: TextInputType.number,
    controller: pincodeC,
    readOnly: true,
    style: Theme.of(context)
        .textTheme
        .subtitle2
        .copyWith(color: colors.fontColor),
    inputFormatters: [FilteringTextInputFormatter.digitsOnly],
    onSaved: (String value) {
      pincode = value;
    },
    validator: (val) =>
      validatePincode(val, getTranslated(context, 'PIN_REQUIRED')),
    decoration: InputDecoration(
      hintText: getTranslated(context, 'PINCODEHINT_LBL'),
      isDense: true,
    ),
  );
}

或者你可以在这张图片中看到我要删除的内容

【问题讨论】:

    标签: flutter dart


    【解决方案1】:

    您正在调用一个名为 setPincode 的函数,该函数返回此 TextFormField。如果您不再需要它,请不要拨打setPincode

    【讨论】:

      猜你喜欢
      • 2021-07-15
      • 2014-03-07
      • 1970-01-01
      • 1970-01-01
      • 2020-05-24
      • 1970-01-01
      • 2022-11-13
      • 1970-01-01
      • 2020-11-07
      相关资源
      最近更新 更多