嘿,我怎么能在文本字段中得到这个标签.因此,对于每封电子邮件,它都会被转换为标签



嘿,我怎么能在textfield中得到这个标签呢。因此,对于每封电子邮件,它都会被转换为标签

试试这个包

以下是的示例片段

TextFieldTags(
tagsStyler: TagsStyler(
tagTextStyle: TextStyle(fontWeight: FontWeight.normal),
tagDecoration: BoxDecoration(color: Colors.blue[300], borderRadius: BorderRadius.circular(0.0), ),
tagCancelIcon: Icon(Icons.cancel, size: 18.0, color: Colors.blue[900]),
tagPadding: const EdgeInsets.all(6.0)
),
textFieldStyler: TextFieldStyler(),
onTag: (tag) {},
onDelete: (tag) {},
validator: (tag){
if(tag.length>15){
return "hey that's too long";
}
return null;
} 
)

请参阅此包https://pub.dev/packages/textfield_tags.它是为同样的目的而设计的。

最新更新