Answers for "flutter build list"

9

flutter listview builder

List<String> litems = ["1","2","Third","4"];
body: new ListView.builder
  (
    itemCount: litems.length,
    itemBuilder: (BuildContext ctxt, int index) {
     return new Text(litems[index]);
    }
  )
Posted by: Guest on June-18-2020
3

generate list flutter

List<int>.generate(3, (int index) => index * index); // [0, 1, 4]
Posted by: Guest on April-22-2021

Browse Popular Code Answers by Language