Beginning App Development with Flutter by Rap Payne
Author:Rap Payne
Language: eng
Format: epub
ISBN: 9781484251812
Publisher: Apress
Stack navigation
If you’re an experienced developer, you’re familiar with queues and stacks. If not, let me explain briefly. Let’s say you work in a kitchen. As plates are cleaned, they’re stacked, right? Each plate is put on the top of the stack. This is called pushing onto the stack. When it is time to serve some food, you naturally take the last plate added, the one on top of the stack. This is called popping off the top of the stack.
Flutter’s navigation works with stacks. When you want to send the user to a new scene, you will push() a widget on the top of the stack and the user sees that widget. Each time you push(), you’re making the stack of scenes taller and taller. When you are ready for them to go back to where they were before, you’ll pop() the last scene off the top of the stack, and what is revealed? The previous scene.
With Flutter’s stack, you’ll typically predefine the scenes (aka routes) and give each a name. This must be done at the MaterialApp level like so:Widget build(BuildContext context) {
return MaterialApp(
title: 'Shopping App',
initialRoute: '/',
routes: {
'/': (BuildContext ctx) => LandingScene(),
'/browse': (BuildContext ctx) => Browse(),
'/product': (BuildContext ctx) => ViewProduct(),
'/checkout: (BuildContext ctx) => Checkout(),
},
);
}
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Linux Device Driver Development Cookbook by Rodolfo Giometti(3932)
Embedded Programming with Modern C++ Cookbook by Igor Viarheichyk(3603)
Implementing Cellular IoT Solutions for Digital Transformation by Dennis McCain(3539)
Embedded Linux Development Using Yocto Project - Third Edition by Otavio Salvador & Daiane Angolini(3369)
TinyML Cookbook by Gian Marco Iodice(3308)
Simplifying 3D Printing with OpenSCAD by Colin Dow(2839)
TinyML Cookbook by Gian Marco Iodice & Ronan Naughton(2602)
Fusion 360 for Makers by Lydia Sloan Cline(2219)
Networking A Beginner's Guide by Bruce Hallberg(2209)
Hands-On Linux for Architects by Denis Salamanca(2051)
But How Do It Know? by J. Clark Scott(2030)
Computers For Seniors For Dummies by Nancy C. Muir(1995)
Raspberry Pi and MQTT Essentials by Dhairya Parikh(1951)
Arduino Project Handbook, Volume 2: 25 Simple Electronics Projects for Beginners by Geddes Mark(1947)
9781803246888-ENHANCING DEEP LEARNING WITH BAYESIAN INFERENCE by Unknown(1899)
Hack and HHVM by Owen Yamauchi(1884)
31 Days Before Your CompTIA A+ Exams (Shanette Luellen's Library) by Benjamin Patrick Conry(1860)
MicroPython Projects by Jacob Beningo(1732)
Hands-On Internet of Things with MQTT by Tim Pulver(1706)
