How to create a widget for map function in flutter with buildContext

I have this code

final users =!;
              return ListView(

I want to create a widget with buildConext

I tried

Widget buildMember(Member user, BuildContext context) => Card(
        child: ListTile()

But got this error:
enter image description here

>Solution : => buildMember(user, context)).toList(),

Leave a Reply