Home > Enterprise >  Hey how can i get this tag thing in textfield. So for every email it get converted into tag
Hey how can i get this tag thing in textfield. So for every email it get converted into tag

Time:03-20

Hey how can i get this tag thing in textfield. So for every email it get converted into tag

CodePudding user response:

Try this package

Here is a example snippet

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;
  } 
)

CodePudding user response:

Refer this package https://pub.dev/packages/textfield_tags. It is designed for same purpose.

  • Related