My button to add item doesn't show.
I ask to user to fill player Name. If user would like to add a player, then click on a button to add a new field
List<Widget> _playerList = new List(); //_playerList is my List name
ListView.builder(
itemBuilder: (context,index){
_playerList.add(new TextField());
Widget widget = _playerList.elementAt(index);
return widget;
}),
new FlatButton.icon(
color: Colors.black,
icon: Icon(
Icons.add,
color: Colors.white,
size: 18,
),
label: Text('Add player',
style: TextStyle(fontSize: 12, color: Colors.white)),
onPressed: () {
_playerList.add(new Text("ggg"));
},
),
Button to add not display