Reputation: 302
I have an array of integers and for each element of that array , I Want to draw a vertical line on screen of that height.How can I implement this using flutter? Below is the structure that I want but with different heights.
Upvotes: 1
Views: 804
Reputation: 162
I got an idea, Try mapping the list,then Use this
Row(children:your_intger_list.map((val)=>_widget(height)).toList());
Widget _widget(int height){
return Container(height:height,width:20,decoration:BoxDecoration(color:Colors.black));
}
Upvotes: 1