flutter create list code example Example: generate list flutter List.generate(3, (int index) => index * index); // [0, 1, 4]