Do you care to know how you can pass value or data from ListView that is calling Stateless class to display in its main class. here is how do go about it.
MAIN CLASS
String? fullName="";
body: SafeArea(
child: ListView(
children: [
//Here are stateless classes, i want to pass data to ProfileRow StateLess class
ProfileRow(userName: fullName!),
OffersList(),
Categories(),
SECOND CLASS
class ProfileRow extends StatelessWidget {
const ProfileRow({Key? key, required this.userName}) : super(key: key);
final String userName;
SHARE THIS POST
0 comments:
Post a Comment