Flutter for Beginners: An introductory guide to building cross-platform mobile applications with Flutter 2.5 and Dart

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Develop the real-world experience you need to build and launch your own Flutter apps

Key Features

  • Get up to speed with the basics of Dart programming and delve into Flutter development
  • Learn about Flutter widgets, plugins, and animations to create a high-quality app user experience
  • Package and deploy your Flutter apps to achieve native-like performance

Book Description

There have been many attempts at creating frameworks that are truly cross-platform, but most struggle to create a native-like experience at high performance levels. Flutter achieves this with an elegant design and a wealth of third-party plugins, making it the future of mobile app development. If you are a mobile developer who wants to create rich and expressive native apps with the latest Google Flutter framework, this book is for you.

This book will guide you through developing your first app from scratch all the way to production release. Starting with the setup of your development environment, you'll learn about your app's UI design and responding to user input via Flutter widgets, manage app navigation and screen transitions, and create widget animations. You'll then explore the rich set of third party-plugins, including Firebase and Google Maps, and get to grips with testing and debugging. Finally, you'll get up to speed with releasing your app to mobile stores and the web.

By the end of this Flutter book, you'll have gained the confidence to create, edit, test, and release a full Flutter app on your own.

What you will learn

  • Explore the core concepts of the Flutter framework and how it is used for cross-platform development
  • Understand the fundamentals of the Dart programming language
  • Work with Flutter widgets and learn the concepts of stateful and stateless widgets
  • Add animation to your app using animated widgets and advanced animations techniques
  • Master the complete development lifecycle, including testing and debugging
  • Investigate the app release process to both mobile stores and the web

Who This Book Is For

This book is for developers looking to learn Google's revolutionary framework Flutter from scratch. No prior knowledge of Flutter or Dart is required.

Author(s): Thomas Bailey, Alessandro Biessek
Edition: 2
Publisher: Packt Publishing
Year: 2021

Language: English
Pages: 353
Tags: Flutter; Dart; Cross-Platform;

Cover
Title page
Copyright and credits
Foreword
Contributor
Table of contents
Preface
Section 1: Introduction to Dart
Chapter 1: An Introduction to Flutter
Technical requirements
What is Flutter?
Backed by Google
Fuchsia OS and Flutter
Dart
One code base to rule them all
Open source framework
Hello Flutter – a first glimpse of Flutter
Installing Flutter
Development environment
Hello world!
Widgets, widgets, everywhere
Flutter rendering
Flutter – rendering by itself
Composability
Immutability
Everything is a widget
Building and running Flutter
Debug mode
Release mode
Profile mode
Supported platforms
The pubspec.yaml file
Running the generated project
Summary
Chapter 2: An Introduction to Dart
Technical requirements
Getting started with Dart
The evolution of Dart
How Dart works
Introducing the structure of the Dart language
Hands-on with Dart
Variables and data types
Variable declaration
Null safety
Built-in types
Control flows and looping
If/else
While and do-while loops
For loops
break and continue
Hands-on continued
Functions and methods
Function parameters
Summary
Chapter 3: Flutter versus Other Frameworks
Native development
Developers
Project management
Defect reports
Performance
Platform features
Hot reload
User experience
App size
New platforms
Retired platforms
Overview
Cross-platform frameworks
React Native
Xamarin
Cordova
Popularity
Flutter community
Events
News and discussion
Resources
Flutter strengths and weaknesses
Strengths
Weaknesses
Summary
Chapter 4: Dart Classes and Constructs
Technical requirements
Object orientation in Dart
Objects and classes
Other OOP artifacts
Encapsulation
Inheritance and composition
Abstraction
Polymorphism
Functions as objects
Understanding classes in Dart
Class structure
Constructors
Class inheritance
Abstract classes
Interfaces
Mixins
Files and imports
The enum type
Using generics
When and why to use generics
Asynchronous programming
Dart Futures
Dart Isolates
Summary
Section 2: The Flutter User Interface – Everything Is a Widget
Chapter 5: Widgets – Building Layouts in Flutter
Technical requirements
Stateful/stateless widgets
Stateless widgets
Stateful widgets
Inherited widgets
The widget key property
Built-in widgets
Basic widgets
Material Design and iOS Cupertino widgets
Layouts
Streams
Summary
Chapter 6: Handling User Input and Gestures
Technical requirements
Handling user gestures
Pointers
Gestures
GestureDetector
Gestures in material widgets
A deeper look at the stateful widget life cycle
Key life cycle states
Mounted
Input widgets and forms
Getting input through a controller
FormField and TextField
Accessing the FormField widget's state
Form
Custom input and FormField widgets
Creating custom inputs
Custom input widget example
Summary
Chapter 7: Routing – Navigating between Screens
Technical requirements
Understanding the Navigator widget
Navigator 1.0 and 2.0
Navigator
Navigator 1.0
Navigator 2.0
Screen transitions
PageRouteBuilder
Custom transitions in practice
Passing data between screens
Passing state in widget parameters
InheritedWidget
BLoC
Redux
Other options
Summary
Section 3: Developing Fully Featured Apps
Chapter 8: Plugins – What Are They and How Do I Use Them?
Technical requirements
What is a plugin?
Benefits
Drawbacks
Where can I find plugins?
How do I add a plugin to my project?
The pubspec.yaml file
flutter pub
Using a plugin in your code
How do plugins work on iOS and Android?
MethodChannel
CocoaPods
Gradle
Common issues
Plugin breaking change
Plugin not working
PR not merged
Inconsistent dependencies
MissingPluginException
Summary
Chapter 9: Popular Third-Party Plugins
Technical requirements
Exploring Firebase plugins
Firebase registration
Connecting the Flutter app to Firebase
FlutterFire plugins
Firebase initialization
Authentication
Realtime Database
Firestore
Analytics and Crashlytics
Cloud Storage
AdMob
Cloud Functions
ML with Firebase ML Kit
Messaging
Understanding Google Maps and Places
Exploring mobile device features
Camera and QR codes
Opening web pages
Local storage
Video
Payment providers
In-app purchases
Opening files
Plugins to help with your app support
App version
Device information
Summary
Chapter 10: Using Widget Manipulations and Animations
Technical requirements
Transforming widgets with the Transform class
The Transform widget
Understanding the Matrix4 class
Exploring the types of transformations
Introducing animations
The Animation class
AnimationController
CurvedAnimation
Tween
Using animations
Rotate animation
Scale animation
Translate animation
Using AnimatedBuilder
The AnimatedBuilder class
Revisiting our animation
Implicitly animated widgets
AnimatedContainer
AnimatedFoo
Summary
Section 4: Testing and App Release
Chapter 11: Testing and Debugging
Technical requirements
Unit testing
The Dart test package
Writing unit tests
Unit test mocking
Widget testing
The flutter_test package
Widget test example
Running a widget test
Debugging your app
Observatory
Additional debugging features
Debugging in the IDE
DevTools
The widget inspector
Profile mode
Summary
Chapter 12: Releasing Your App to the World
Technical requirements
Preparing the stores
Preparing for web
Releasing your app on Android
AndroidManifest and build.gradle
Build and upload your appbundle
Releasing your app on iOS
App Store Connect
Xcode
Build and upload
Releasing your app on the web
Firebase hosting
PWA support
Tracking app usage and crashes
Crashlytics
Google Analytics
Summary
Other Books You May Enjoy
Index