wu9007 / multiple_select

MIT License
8 stars 11 forks source link

adding fixed list #12

Open aqeelhashem opened 3 years ago

aqeelhashem commented 3 years ago

thanks for your library.

i want to add fixed list like this to customer can select multiple items from it:

 List  elements2 = [
    "Raspberry in Light",
    "Apple Red",
    "Avocado",
    "Banana",
    "Blackberry",
    "Blueberry",
    "Orange",
    "Raspberry",
    "Kiwi",
    "Mango Fresh",
    "Pumpkin Red",
    "Sweet Melon",
    "Strawberry",
    "Apricot",
    "Peach",
    "Coconut Greated Fresh",
    "Grapes Green",
    "Mandarin",
    "Orange Juice (In House)",
  ];

but i don't know haw can add it with these generated list ?

  List<MultipleSelectItem> elements = List.generate(
    15,
        (index) => MultipleSelectItem.build(
      value: index,
      display: '$index display',
      content: '$index content',
    ),
  );