Dn-a / flutter_tags

With flutter tags you can create selectable or input tags that automatically adapt to the screen width
https://pub.dartlang.org/packages/flutter_tags
MIT License
507 stars 127 forks source link

Correction to the Example #55

Closed pradt closed 3 years ago

pradt commented 4 years ago

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.

Dn-a commented 4 years ago

@pradt thanks for the hint