September 2019
Beginner
512 pages
12h 52m
English
First of all, we will define our home page as a statelessWidget instance, as we now care only about layout and do not have any actions to be managed that would result in a state change. That is why the parent widget, MyApp, passes values to the defined list fields. Remember, when a widget is stateless, its description is defined by the parent widget during its creation. This is shown in the following code:
class FavorsPage extends statelessWidget { // using mock values from mock_favors dart file for now final List<Favor> pendingAnswerFavors; final List<Favor> acceptedFavors; final List<Favor> completedFavors; final List<Favor> refusedFavors; FavorsPage({ Key key, this.pendingAnswerFavors, this.acceptedFavors, this.completedFfavors, ...