How do I get the value of the List data to be accessed from the class Details Page? The value is already set in the constructor via a page route.
class TicketDetailsPage extends StatefulWidget {
final List data; //<--This is the List
TicketDetailsPage({Key key, this.data}) : super(key: key);
@override
State<StatefulWidget> createState() => new _State();
}
class _State extends State<TicketDetailsPage> {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Ticket Details",
debugShowCheckedModeBanner: false,
home: DetailsPage(),
);
}
}
class DetailsPage extends StatelessWidget {
//<--Access the list right here-->
}