Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Flutter Projects

You're reading from   Flutter Projects A practical, project-based guide to building real-world cross-platform mobile applications and games

Arrow left icon
Product type Paperback
Published in Apr 2020
Publisher Packt
ISBN-13 9781838647773
Length 490 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Simone Alessandria Simone Alessandria
Author Profile Icon Simone Alessandria
Simone Alessandria
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Hello Flutter! 2. Miles or Kilometers? Using Stateful Widgets FREE CHAPTER 3. My Time - Listening to a Stream of Data 4. Pong Game - 2D Animations and Gestures 5. Let's Go to the Movies - Getting Data from the Web 6. Store That Data - Using Sq(F)Lite To Store Data in a Local Database 7. Firing Up the App - Integrating Firebase into a Flutter App 8. The Treasure Mapp - Integrating Maps and Using Your Device Camera 9. Let's Play Dice: Knockout - Creating an Animation with Flare 10. ToDo App - Leveraging the BLoC Pattern and Sembast 11. Building a Flutter Web App 12. Assessment 13. Other Books You May Enjoy Appendix

Project overview

The measures conversion app will allow your users to select a measure – metric or imperial – and convert it to another measure. For example, they'll be able to convert a distance in miles to a distance in kilometers, or a weight in kilograms to a weight in pounds. So, next time you travel to a country with a different system, you'll be able to easily understand the speed of your car (and maybe avoid a fine), or the weight of the food you can buy at the market, and along the way, you'll build on your Flutter skills.

By the end of this chapter, you'll know how to leverage State using widgets such as TextFields to interact with users and make your apps interactive.

While doing so, you'll encounter several fundamental concepts in Flutter, and in particular, the following:

  • You'll see what State is in Flutter, start using stateful widgets, and understand when you should use stateless or stateful widgets.
  • You'll see how and when to update the State in your app.
  • You'll also see how to handle events, such as onChanged and OnSubmitted in a TextField.
  • You'll see how to use the most common user input widget—TextField.
  • Another very important widget that you'll use for this project is DropDownButton. It's a drop-down list where you decide the choices that your users have. And those choices are called DropDownItems in Flutter.
  • You'll see how to start separating the logic of your app from the User Interface (UI), and you'll gain a few tips on how to build the structure of your app.
While stateful widgets are the most basic way to deal with State in an app, there are other, more efficient ways to deal with State in Flutter. Some of those will be shown in the upcoming projects.

The following is the final layout of the project that you'll build in this chapter:

As you can see, this is a rather standard form with Material Design widgets, which should be very easy to compile for your users. You can use it as a starting point for any form that you use in your future apps.

You have been reading a chapter from
Flutter Projects
Published in: Apr 2020
Publisher: Packt
ISBN-13: 9781838647773
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image