Flutter Cookbook: 100+ step-by-step recipes for building cross-platform, professional-grade apps with Flutter 3.10.x and Dart 3.x. 2 Ed

Flutter Cookbook: 100+ step-by-step recipes for building cross-platform, professional-grade apps with Flutter 3.10.x and Dart 3.x. 2 Ed

Flutter Cookbook: 100+ step-by-step recipes for building cross-platform, professional-grade apps with Flutter 3.10.x and Dart 3.x. 2 Ed
Автор: Alessandria Simone
Дата выхода: 2023
Издательство: Packt Publishing Limited
Количество страниц: 819
Размер файла: 6,2 МБ
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы  Дополнительные материалы 

Cover Page
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
How to create a Flutter app
Creating a unit test
Summary
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
Technical requirements
Creating immutable widgets
Using a Scaffold
Using the Container widget
Printing stylish text on the screen
Importing fonts and images into your app
Summary
Mastering Layout and Taming the Widget Tree
Placing widgets one after another
Proportional spacing with the Flexible and Expanded widgets
Drawing shapes with CustomPaint
Nesting complex widget trees
Refactoring widget trees to improve legibility
Applying global themes
Summary
Adding Interactivity and Navigation to Your App
Adding state to your app
Interacting with buttons
Making it scroll
Handling large datasets with list builders
Working with TextFields
Navigating to the next screen
Showing dialogs on the screen
Presenting bottom sheets
Basic State Management
Technical requirements
Model-view separation
Managing the data layer with InheritedWidget and InheritedNotifier
Making the app state visible across multiple screens
Summary
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
Technical requirements
How to use Dart streams
Using stream controllers and sinks
Injecting data transforms into streams
Subscribing to stream events
Allowing multiple stream subscriptions
Using StreamBuilder to create reactive user interfaces
Using the BLoC pattern
Summary
Using Flutter Packages
Technical requirements
Importing packages and dependencies
Using dev dependencies
Creating your own package (part 1)
Creating your own package (part 2)
Creating your own package (part 3)
Adding Google Maps to your app
Using location services
Adding markers to a map
Summary
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
Configuring a Firebase app
Creating a login screen
Adding Google Sign-in
Customizing Sign in
Integrating Firebase Analytics
Using Firebase Cloud Firestore
Sending push notifications with Firebase Cloud Messaging (FCM)
Storing files in the cloud
Summary
Firebase Machine Learning
Using the device’s camera
Recognizing text from an image
Reading a barcode
Image labeling
Building a face detector and detecting facial gestures
Identifying a language
Using TensorFlow Lite
Summary
Flutter Web and Desktop
Creating a responsive app leveraging Flutter Web
Running your app on macOS
Running your app on Windows
Deploying a Flutter website
Responding to mouse events in Flutter Desktop
Interacting with desktop menus
Summary
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

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.


Похожее:

Список отзывов:

Нет отзывов к книге.