Book description
Write, test and publish your web, desktop, and embedded apps with this most up-to-date book on Flutter using the Dart programming language.
Key Features
- Thoroughly updated to cover the latest features in Flutter 3.10.x and Dart 3.x
- Practical recipes to publish responsive, multi-platform apps from a single database
- Covers not just the ‘hows’ but the ‘whys’ of Flutter’s features with examples
Book Description
Are you ready to tap into the immense potential of Flutter?
With over 1,000 new mobile apps published every day on the Apple and Google Play stores, Flutter is transforming the landscape of app development. It's time for you to join the revolution.
Introducing the second edition of Flutter Cookbook, a step-by-step guide designed exclusively for you. Whether you're a seasoned developer or just starting your coding journey, this book is your ultimate companion. Dive into the latest features of Flutter 3.10 and unlock the secrets to building professional-grade, cross-platform applications.
With our recipe-based approach, we'll not only show you how to implement Flutter's features but also explain why they work. Through practical examples and real-world execution, you'll gain a deeper understanding of Flutter's inner workings. From crafting stunning UI/UX with widgets to leveraging hot reload and restart techniques, we'll equip you with best practices and invaluable knowledge.
As you progress, you'll learn to efficiently manage data, add interactivity and animations, and integrate essential Flutter plugins like maps, camera, voice recognition and more. And let's not forget the dedicated chapter on implementing MLkit powered by TensorFlow Lite. We'll guide you through building custom machine learning solutions, expanding the capabilities of your apps.
By the time you reach the end of this comprehensive Flutter book, you'll have the skills and confidence to write and deliver fully functional apps.
What you will learn
- Familiarize yourself with Dart fundamentals and set up your development environment
- Efficiently track and eliminate code errors with proper tools
- Create various screens using multiple widgets to effectively manage data
- Craft interactive and responsive apps by incorporating routing, page navigation, and input field text reading
- Design and implement a reusable architecture suitable for any app
- Maintain control of your codebase through automated testing and developer tooling
- Develop engaging animations using the necessary tools
- Enhance your apps with ML features using Firebase MLKit and TensorFlow Lite
- Successfully publish your app on the Google Play Store and the Apple App Store
Who this book is for
Developers who are familiar with the OOP language and prefer learning-by-doing will get the most out of this book.
If you have some experience building apps on Flutter or have been playing around with the framework for some time now and have set eyes on developing mobile apps using Dart, then this book is for you.
Table of contents
- Preface
-
Getting Started with Flutter
- Why Flutter?
- Technical requirements
- Installing Flutter: a high-level overview
- Installing the Flutter SDK
- How to use Git to manage the Flutter SDK
- Setting up the command line and saving path variables
- Confirming your environment is correct with Flutter Doctor
- Configuring the iOS SDK
- Configuring the Android SDK setup
- Which IDE/editor should you choose?
- Picking the right channel
- Summary
- Creating Your First Flutter App
-
Dart: A Language You Already Know
- Technical requirements
- Declaring variables—var versus final versus const
- Strings and string interpolation
- How to write functions
- How to use functions as variables with closures
- Using Switch Expressions, Records and Patterns
- Creating classes and using the class constructor shorthand
- How to group and manipulate data with collections
- Writing less code with higher-order functions
- How to take advantage of the cascade operator
- Using extensions
- Introducing Dart Null Safety
- Using Null Safety in classes
- Summary
- Introduction to Widgets
- Mastering Layout and Taming the Widget Tree
- Adding Interactivity and Navigation to Your App
- Basic State Management
-
The Future is Now: Introduction to Asynchronous Programming
- Technical requirements
- Using a Future
- Using async/await to avoid callbacks
- Completing Futures
- Firing multiple Futures at the same time
- Resolving errors in asynchronous code
- Using Futures with StatefulWidgets
- Using the FutureBuilder to let Flutter manage your Futures
- Turning navigation routes into asynchronous functions
- Getting the results from a dialog
- Summary
-
Data Persistence and Communicating with the Internet
- Technical requirements
- Converting Dart models into JSON
- Handling JSON schemas that are incompatible with your models
- Catching common JSON errors
- Saving data simply with SharedPreferences
- Accessing the filesystem, part 1: path_provider
- Accessing the filesystem, part 2: Working with directories
- Using secure storage to store data
- Designing an HTTP client and getting data
- POST-ing data
- PUT-ting data
- DELETE-ing data
- Advanced State Management with Streams
- Using Flutter Packages
-
Adding Animations to Your App
- Creating basic container animations
- Designing animations part 1 — Using the AnimationController
- Designing animations part 2 — Adding multiple animations
- Designing animations part 3 — Using curves
- Optimizing animations
- Using Hero animations
- Using premade animation transitions
- Using the AnimatedList widget
- Implementing swiping with the Dismissible widget
- Using the animations Flutter package
- Summary
- Using Firebase
- Firebase Machine Learning
- Flutter Web and Desktop
-
Distributing Your Mobile App
- Technical requirements
- Registering your iOS app on App Store Connect
- Registering your Android app on Google Play
- Installing and configuring fastlane
- Generating iOS code signing certificates and provisioning profiles
- Generating Android release certificates
- Configuring your app metadata
- Adding icons to your app
- Publishing a beta version of your app in the Google Play Store
- Using TestFlight to publish a beta version of your iOS app
- Publishing your app to the stores
- Summary
- Other Books You May Enjoy
- Index
Product information
- Title: Flutter Cookbook - Second Edition
- Author(s):
- Release date: May 2023
- Publisher(s): Packt Publishing
- ISBN: 9781803245430
You might also like
book
Flutter Cookbook
Discover how to build, scale, and debug native iOS and Android applications from a single codebase …
book
Flutter and Dart Cookbook
Learn the essentials of working with Flutter and Dart to build full stack applications that meet …
book
Flutter for Beginners - Second Edition
Develop the real-world experience you need to build and launch your own Flutter apps with this …
book
Flutter for Beginners - Third Edition
Follow this step-by-step illustrated guide to launch your own Flutter apps and gain hands-on experience Key …