I have this code
final users = snapshot.data!;
return ListView(
children: users.map(buildMember).toList(),
);
I want to create a widget with buildConext
I tried
Widget buildMember(Member user, BuildContext context) => Card(
child: ListTile()
);
CodePudding user response:
users.map((user) => buildMember(user, context)).toList(),