Version First Edition - Early Access 1
Platform Flutter 1.20
Language Dart 2.9
Editor Android Studio 4.0.1

Build for both iOS and Android with Flutter!

Flutter is a new and exciting software development toolkit that lets you target multiple platforms at once, so you can build apps for iOS, Android and even web and desktop, all from a single codebase.

Similar to modern web technologies, Flutter uses a declarative approach to UI development. You can take advantage of “hot reload” of new code while developing, and your apps will perform at native speed thanks to Flutter’s custom rendering engine.

It’s been the dream of mobile developers for years to find a cross-platform tool that lets you build for both iOS and Android without having to write and maintain two separate codebases. With Flutter and Flutter Apprentice, you can achieve that dream!

Before You Begin

This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more.

i

iii

iv

Section I: Build Your First Flutter App

The chapters in this section will introduce you to Flutter, get you up and running with a Flutter development environment and walk you through building your first Flutter app.

You’ll learn about where Flutter came from and why it exists, understand the structure of Flutter projects, and see how to create the user interface of a Flutter app.

You’ll also get your first introduction to the key component found in Flutter user interfaces: Widgets!

Welcome to Flutter! This chapter explains what Flutter is, why you should use it and how to get your development environment set up.

1

In this chapter, you’ll build your first new Flutter application and get the hang of fundamentals.

2

Section II: Everything’s a Widget

In this section you’ll start to build a full-featured recipe app named Fooderlich. You’ll gain an understanding of and use a wide range of widgets available in Flutter, and learn about the theory of how widgets work behind the scenes.

You’ll then dive deeper into layout widgets, scrollable widgets and interactive widgets.

Get started with the fundamental widgets to build your app. Learn to apply structure and navigation, display, and positional widgets!

3

Dive into the theory of widgets. Get a better understanding of how widgets are rendered, their lifecycle, and tools for debugging widgets.

4

Scrollable content is always a must in any app. In this chapter you will learn about list and grid widgets to display content vertically and horizontally.

5

Learn about the various control and input widgets to trigger updates to your user interface such as text fields, sliders, color picker, input chips and dismissable widgets.

6

Section III: Navigating Between Screens

You’ll continue working on the Fooderlich app in this section, learning about navigating between screens and adding animations to your user interface.

Topics you’ll learn include routes, presenting modals and UI transition animations.

Find out how to navigate between your screens. Learn how to create routes and pass data around!

7

Learn how to reveal more content in different ways using widgets such as BottomSheet, Dialog, SnackBar, and ExpansionPanel.

8

Spice up your screen transitions with beautiful animations.

9

Section IV: Networking, Persistence and State

Most apps interact with the network to retrieve data and then persist that data locally in some form of cache, such as a database. In this section, you’ll build a new app that lets you search the Internet for recipes, bookmark recipes, and save their ingredients into a shopping list.

You’ll learn about making network requests, parsing the network JSON response, and saving data in a SQLite database. You’ll also get an introduction to using Dart streams.

Finally, this section will also dive deeper into the important topic of app state, which determines where and how your user interface stores and refreshes data in the user interface as a user interacts with your app.

This chapter will teach you how to save simple data to your device's local storage, which can be used to save flags, IDs, numbers, etc. and will work on both Android and iOS devices.

10

Learn how to serialize data from a JSON string in to Dart model classes. This is needed when using REST APIs to download data from the network.

11

This chapter will teach you how to retrieve data from the internet and use the knowledge you learned in the previous chapter to put that information into model classes.

12

See how to use the Chopper library to retrieve data from the internet. Unlike the built-in networking methods in Dart, this library makes doing all the necessary tasks for REST API communication easy.

13

Learn about all the different state management classes in Flutter and in the Provider library. See how to communicate data all the way down the widget tree.

14

This chapter will teach you how to use Streams in your Flutter app and explain how they help with data changes being communicated throughout your app.

15

See how to save complex data to your device's local storage using the Android and iOS built-in SQLite database system.

16

Section V: Deployment

Building an app for you own devices is great; sharing your app with the world is even better!

In this section you’ll go over the steps and process needed to release your apps to the iOS App Store and Google Play Store. You’ll also see how to use platform-specific assets in your apps.

Making multiplatform applications means you’ll need to add or build a few things specific to one platform or another. This chapter covers common things to include and how to implement them.

17

You’re finally ready to get your Flutter app prepared for the Google Play Store. This chapter covers the release and deployment process.

18

No multiplatform app is complete without an iOS version. This chapter covers the release and deployment process for the Apple App Store.

19

Meet the team

Contributors

Who is this book for

This book is for developers that are new to Flutter, including developers with experience on iOS, Android and web.

Concepts covered in this book

  • Flutter widgets
  • Fetching data
  • State management
  • Dart
  • Deploying to app stores

Version history

First Edition - Early Access 1 · Flutter 1.20, Dart 2.9, Android Studio 4.0.1

v1.0.ea1 · Oct 1 2020 · Kevin Moore, Michael Katz & Vincent Ngo

Flutter Apprentice

By Kevin Moore, Michael Katz and Vincent Ngo

Build for both iOS and Android with Flutter! Flutter is a new and exciting software development toolkit that lets you target multiple platforms at once, so you can build apps for iOS, Android and even web and desktop, all from a single codebase.

Read for Free with an Ultimate Beginner Subscription* * Includes this and all other Beginner books in our online library See all benefits
Buy Individually $59.99* *Includes access to all of our online reading features.
See buying options
Hide buying options

All videos. All books.
One low price.

A raywenderlich.com subscription is the best way to learn and master mobile development — plans start at just $19.99/month!

Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.