美文网首页
flutter TextFormField 提示语句换行

flutter TextFormField 提示语句换行

作者: 系酷酷的小魏哦 | 来源:发表于2022-03-03 11:32 被阅读0次

TextFormField(

  controller: _nameController,

  decoration: InputDecoration(

    errorMaxLines: 3, // 错误文本将换行的行数

  ),

  validator: (value) {

    if (value.isEmpty) {

      return '"name不能为空';

    } 

    return null;

  },

)

相关文章

网友评论

      本文标题:flutter TextFormField 提示语句换行

      本文链接:https://www.haomeiwen.com/subject/hfpzfxtx.html