Dn-a / flutter_tags

With flutter tags you can create selectable or input tags that automatically adapt to the screen width

Home Page:https://pub.dartlang.org/packages/flutter_tags

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Correction to the Example

pradt opened this issue · comments

commented

I tried to use the example provided in the readme and it didn't work, after digging around I noticed that what you actually need instead of

setState(() {
              // required
            _items.add(str);
          });

is

setState(() {
              // required
             
            _items.add(Item(
                title: str,
                active: true,
                index: 1,
                
              ));
          });

It might help others out.

@pradt thanks for the hint