Chapters

Hide chapters

Flutter Apprentice

First Edition – Early Access 3 · Flutter 1.22.6 · Dart 2.10.5 · Android Studio 4.1.2

Section III: Navigating Between Screens

Section 3: 3 chapters
Show chapters Hide chapters

Section IV: Networking, Persistence and State

Section 4: 7 chapters
Show chapters Hide chapters

Appendices

Section 6: 2 chapters
Show chapters Hide chapters

B. Appendix B: Chapter 5 Solution 2
Written by Vincent Ngo

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In recipes_grid_view.dart, replace the gridDelegate parameter with the following:

const SliverGridDelegateWithMaxCrossAxisExtent(maxCrossAxisExtent: 500.0),

Recall that the GridView is set to scroll in the vertical direction. That means the cross axis is horizontal. According to Flutter’s documentation, maxCrossAxisExtent sets the maximum extent of tiles in the cross axis. So making maxCrossAxisExtent greater than the device’s width would allow for only one column!

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2024 Kodeco Inc.

You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now