Skip to Main Content
Flutter for Beginners
book

Flutter for Beginners

by Alessandro Biessek
September 2019
Beginner content levelBeginner
512 pages
12h 52m
English
Packt Publishing
Content preview from Flutter for Beginners

The layout code

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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flutter for Beginners - Second Edition

Flutter for Beginners - Second Edition

Thomas Bailey, Alessandro Biessek
Flutter for Beginners - Third Edition

Flutter for Beginners - Third Edition

Thomas Bailey, Alessandro Biessek

Publisher Resources

ISBN: 9781788996082Supplemental Content