Center( //1
child: ListView(
children:const [
ListTile(
leading: Icon(Icons.map),
title: Text('map'),
),
ListTile(
leading: Icon(Icons.phone),
title: Text('phone'),
),
ListTile(
leading: Icon(Icons.photo_album),
title: Text('album'),
),
],
),
),
Please explain me why this error has occured.This is the error Too many positional arguments: 0 expected, but 1 found.
2
Answers
i tried your code and there’s no error at all. i think it might be other than that listview is causing the error. try to check your debug console message
this is the code I tried
and the code work without any error/problem
I guess this is going to work for you but try it.I would recommend you to not use ListView but ListView.builder,Just follow the next example.
Then return ListView.builder like this.