Flutter in Action
Eric Windmill
  • MEAP began September 2018
  • Publication in November 2019 (estimated)
  • ISBN 9781617296147
  • 310 pages (estimated)
  • printed in black & white

In this book, you’ll not only see how to use Flutter, but you’ll understand why using Flutter in the ways Eric and people online say to actually works in practice.

Ray Rischpater, Technical Program Manager, Flutter
In 2017, consumers downloaded 178 billion apps, and analysts predict growth to 258 billion by 2022. Mobile customers are demanding more—and better—apps, and it’s up to developers like you to write them! Flutter, a revolutionary new cross-platform software development kit created by Google, makes it easier than ever to write secure, high-performance native apps for iOS and Android. Flutter apps are blazingly fast because this open source solution compiles your Dart code to platform-specific programs with no JavaScript bridge! Flutter also supports hot reloading to update changes instantly. And thanks to its built-in widgets and rich motion APIs, Flutter’s apps are not just highly responsive, they’re stunning!
Table of Contents detailed table of contents

Part 1: Meet Flutter

1 Welcome

1.1 On Dart

1.2 Why Does Flutter Use Dart?

1.3 Who Uses Flutter?

1.4 Who should be using Flutter?

1.4.1 Teams, Project Leads, and CTOs

1.4.2 Individual Developers

1.4.3 Code School Students and Recent CS Grads

1.4.4 Open Source Developers

1.4.5 People Who Value Speed

1.4.6 People Who Are Lazy

1.4.7 People Who Value Control

1.5 Who is This Book For?

1.6 Other Mobile Development Options

1.6.1 Native Development (iOS and Android)

1.6.2 Cross-Platform JavaScript Options

1.7 The Immediate Benefits of Flutter

1.7.1 No JavaScript Bridge

1.7.2 Compile Time

1.7.3 Write Once, Test Once, Deploy Everywhere

1.7.4 Code Sharing

1.7.5 Productivity and Collaboration

1.7.6 Code Maintenance

1.7.7 The Bottom Line: Is Flutter for You?

1.8 Future Benefits of Flutter: Web apps and desktop apps

1.9 A Brief Intro into How Flutter Works

1.9.1 Everything is A Widget

1.9.2 Composing UI with Widgets

1.9.3 Widget Types

1.10 Flutter Rendering: Under the Hood

1.10.1 Compose the Widget Tree and Layout

1.10.2 Composite step

1.10.3 Paint to the screen

1.11 Final Note

1.12 Summary

2 A Brief Intro to Dart

2.1 Hello, Dart!

2.1.1 Anatomy of a Dart Program

2.2 Programming a Greeter: Hello, _!

2.2.1 Add more greetings

2.2.2 I/O and Dart Libraries

2.3 Common Programming Concepts In Dart

2.3.1 Intro to Dart’s Type System


2.3.3 Variables and Assignment

2.3.4 Operators

2.3.5 Null Aware Operators

2.4 Control Flow

2.4.1 if and else

2.4.2 switch and case

2.4.3 Advanced Switch usage

2.4.4 Loops

2.5 Functions

2.5.1 Anatomy of a Dart Function

2.5.2 Parameters

2.5.3 Default parameter values

2.5.4 Advanced Function Concepts

2.5.5 Lexical Scope

2.6 Object Oriented Programming (in Dart)

2.6.1 Classes

2.6.2 Constructors

2.6.3 Inheritance

2.6.4 Factories and Named Constructors

2.6.5 Enumerators

2.7 A note about more Dart features

2.8 Summary

3 Meet Flutter

3.1 Intro to the counter app

3.1.1 Flutter project structure

3.1.2 Anatomy of a Flutter App

3.1.3 Again, "Everything is a Widget"

3.1.4 The build method

3.1.5 new and const constructors in Flutter

3.1.6 Hot Reload

3.2 Widgets: The widget tree, widget types and the State object

3.2.1 Stateless Widget

3.2.2 Stateful Widget

3.2.3 setState

3.2.4 initState

3.3 BuildContext

3.4 Enhancing the Counter app with the most important widgets

3.4.1 Raised Button

3.5 Intro to Layout in Flutter

3.5.1 Row and Column

3.5.2 Layout Constraints in Flutter

3.5.3 RenderObject

3.5.4 RenderObject and Constraints

3.5.5 RenderBoxes and layout errors

3.5.6 Multi-child widgets

3.5.7 Icons and the FloatingActionButton

3.5.8 Images

3.5.9 Container Widget

3.6 The Element Tree

3.6.1 Elements and Widgets

3.6.2 Exploring the Element Tree with an example

3.6.3 The Element Tree and State Objects

3.6.4 Widget Keys

3.7 A final note

3.8 Summary

Part 2: Weather App - UI and Animations

4 Flutter UI: Important Widgets, Theme, and Layout

4.1 Setting up and configuring a Flutter app

4.1.1 Configuration: pubspec and main.dart

4.1.2 SystemChrome

4.2 Structural Widgets and more configuration

4.2.1 MaterialApp widget

4.2.2 Scaffold

4.2.3 AppBar and PreferredSizeWidget

4.3 Styling in Flutter and Theme

4.3.1 Theme

4.3.2 MediaQuery and the of method

4.3.3 ScreenAwareSize method

4.4 Common Layout and UI widgets

4.4.1 Stack

4.4.2 Table

4.4.3 TabBar

4.5 ListView and Builders

4.6 Summary

5 User Interaction: Forms and Gestures

5.1 User interaction and gestures

5.1.1 The GestureDetector widget

5.1.2 The GestureDetector in practice

5.1.3 Dismissible

5.2 Flutter Forms

5.2.1 The Form widget

5.2.2 GlobalKey<FormState>

5.3 FormField widgets

5.3.1 TextFormField

5.3.2 DropdownFormButton

5.3.3 Generic Form Fields

5.4 Form UI and working with focus nodes

5.4.1 InputDecoration

5.4.2 Improve UI with FocusNodes

5.5 Form methods help manage form state

5.5.1 Form.onChange

5.5.2 FormState.save

5.5.3 Form.onWillPop

5.6 Summary

6 Pushing Pixels: Flutter Animations and using the Canvas

6.1 Introducing Flutter Animations

6.1.1 Tweens

6.1.2 Animation Curves

6.1.3 Ticker providers

6.1.4 AnimationController

6.1.5 AnimatedWidget

6.1.6 Implementing the AnimationController and Tween for the background

6.2 CustomPainter and the Canvas

6.2.1 The shapes used to make up the clouds

6.2.2 Define the CustomPainter and Paint object

6.2.3 CustomPainter paint method

6.3 Animations Again: Staggered animations, TweenSequence, and built in animations

6.3.1 Creating a custom animation state class

6.3.2 Built in animation widgets: SlideTransition

6.3.3 TweenSequence

6.4 Reusable color transition custom widgets

6.5 Summary

Part 3: E-commerce App: State Management and Async Dart

7 Flutter Routing In Depth

7.1 Routing in Flutter

7.1.1 The Farmers Market app

7.1.2 The app source code

7.2 Declarative Routing and Named Routes

7.2.1 Declaring routes

7.2.2 MaterialDrawer widget and a the full menu

7.2.3 Highlight active route with RouteAware

7.3 Routing on the Fly

7.3.1 MaterialRouteBuilder

7.3.2 showSnackBar, showBottomSheet and the like

7.4 Routing Animations

7.5 Summary

8 Flutter State Management

8.1 Deep Dive into StatefulWidget

8.1.1 The Widget Tree and the Element Tree

8.1.2 The StatefulWidget Lifecycle and When to Do What

8.2 Pure Flutter state management: The InheritedWidget

8.2.1 Creating a Central Store wth an InheritedWidget + StatefulWidget team

8.2.2 The 'inheritFromWidgetOfExactType' and 'of' methods

8.2.3 Use the of method to lift state up

8.2.4 State management patterns beyond Flutter

8.3 Blocs: Business Logic Components

8.3.1 Blocs. How do they work?

8.3.2 Implementing the Bloc architecture

8.3.3 Intro to Streams and Async Dart

8.3.4 Implementing Streams in the CartBloc

8.4 Summary

9 Async Dart and Flutter (and some scrolling tips)

9.1 Async Dart

9.1.1 Future Recap

9.1.2 async / await

9.2 Sinks and Streams (and StreamControllers)

9.2.1 Implementing streams

9.2.2 Broadcast streams

9.2.3 Higher Order Streams

9.3 Using streams in blocs

9.3.1 Implementing a bloc input

9.4 Async Flutter: StreamBuilder

9.5 Infinite and Custom Scrollable widgets

9.5.1 CustomScrollView and Slivers

9.5.2 CatalogWidget scroll view

9.5.3 Delegates

9.5.4 Custom sliver

9.6 Summary

Part 4: Beyond the Foundation

10 Working with data: HTTP, Firestore, and JSON

10.1 HTTP and Flutter

10.1.1 HTTP package

10.1.2 GET request

10.1.3 JSON Serialization

10.1.4 Bring it all together in the UI

10.2 Firebase and Flutter

10.2.1 Create a Firestore project

10.2.2 Configure your app

10.2.3 Add Firebase to your pubspec

10.2.4 Use Firestore

10.3 Dependency Injection

10.4 Summary

11 Testing and Accessibilty

11.1 Testing Flutter apps

11.1.1 Setup for Dart Unit tests

11.1.2 Writing Dart unit tests

11.1.3 Using Mockito to test methods that need external dependencies

11.1.4 Flutter widget tests

11.1.5 Flutter integration tests

11.1.6 Performance profiling integration tests

11.2 Accessibility with the Semantics widgets

11.3 Wrap up

11.4 Summary


Appendix A: Installation and Tools

Installation: Dart2

Mac OS



Installation: Flutter SDK

Mac OS



Appendix B: Installation and Tools

Appendix C: Pub package manager

Appendix D: Flutter for Web Developers

Appendix E: Flutter for iOS Developers

Appendix F: Flutter for Android Developers

About the book

Flutter in Action teaches you to build awesome, full-featured mobile applications with Flutter. Author Eric Windmill walks with you every step of the way as you build apps that get you coding as you learn. With the engaging hands-on examples, you’ll create a basic user interface, learn about state management, and integrate a database with a Dart web app. You’ll also delve into widgets, styling with themes, animations, handling user input, and more. As a bonus, you’ll gain experience coding in Google’s instantly familiar Dart programming language, which has features sure to boost your productivity. Programmers familiar with any high-level language will feel right at home with Dart. If you want to build beautiful, fast, cross-platform mobile apps, you need this easy-to-follow tutorial! And with Eric Windmill’s informal, friendly style, learning Flutter is as much fun as writing the apps!

What's inside

  • Understanding the basic Flutter UI
  • Working with widgets
  • Building layouts in Flutter
  • State management
  • Handling user input
  • Integrating platform-specific functionality for iOS and Android
  • Sharing code between Flutter and the web
  • Built-in and custom animations
  • Testing and debugging

About the reader

For developers familiar with the basics of programming web applications. No experience with Dart or Flutter needed!

About the author

Eric Windmill is a professional Dart developer, a contributor to open-source Flutter projects, and the author of FlutterByExample.com. His work is featured on Flutter’s own showcase page, https://flutter.io/showcase.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks