Cross-Platform UIs with Flutter: Unlock the ability to create native multiplatform UIs using a single code base with Flutter 3
- Length: 260 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-08-26
- ISBN-10: 1801810494
- ISBN-13: 9781801810494
- Sales Rank: #263372 (See Top 100 Books)
Build a variety of dynamic projects and beautiful UIs as you explore the power of Flutter for the web, desktop, and mobile
- Discover state management solutions with InheritedWidget and the Provider package
- Create responsive and beautiful UIs with the Material and Cupertino libraries
- Explore animations, forms, gestures, and backend integration with Supabase
Flutter is a UI toolkit for building beautiful, natively compiled applications for mobile, web, desktop, and embedded devices from a single code base. With Flutter, you can write your code once and run it anywhere using a single code base to target multiple platforms. This book is a comprehensive, project-based guide for new and emerging Flutter developers that will help empower you to build bulletproof applications.
Once you start reading book, you’ll quickly realize what sets Flutter apart from its competition and establish some of the fundamentals of the toolkit. As you work on various project applications, you’ll understand just how easy Flutter is to use for building stunning UIs. This book covers navigation strategies, state management, advanced animation handling, and the two main UI design styles: Material and Cupertino. It’ll help you extend your knowledge with good code practices, UI testing strategies, and CI setup to constantly keep your repository’s quality at the highest level possible.
By the end of this book, you’ll feel confident in your ability to transfer the lessons from the example projects and build your own Flutter applications for any platform you wish.
What you will learn
- Create responsive and attractive UIs for any device
- Get to grips with caching and widget trees and learn some framework performance tips
- Manage state using Flutter’s InheritedWidget system
- Orchestrate the app flow with Navigator 1.0 and 2.0
- Explore the Material and Cupertino built-in themes
- Breathe life into your apps with animations
- Improve code quality with golden tests, CI setup, and linter rules
Who this book is for
This book is for software developers with a good grasp of Flutter, who want to learn best practices and techniques for building clean, intuitive UIs using a single codebase for mobile and the web. Prior experience with Flutter, Dart, and object-oriented programming (OOP) will help you understand the concepts covered in the book.
Cross-Platform UIs with Flutter Contributors About the authors About the reviewers Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share your thoughts Building a Counter App with History Tracking to Establish Fundamentals Technical requirements Understanding the foundations – widgets, elements, and render objects Setting up the project Creating an enhanced counter app The title widget The counter widget The history widget Manually caching a widget Making everything constant Summary Further reading Building a Race Standings App Technical requirements Setting up the project Localization and internationalization Routes management Adding a custom font Creating the race standings app The HomePage widget The results tab The drivers’ standings tab The NextRaces widget Summary Further reading Building a Todo Application Using Inherited Widgets and Provider Technical requirements Sharing dependencies in a Flutter application Setting up the project Creating the Todo application Using InheritedWidget for state management Starting with property passing Creating an InheritedNotifier Getting information from TodosController using TodosScope Providing TodosController in the widget tree Refactoring with Provider Installing Provider Getting information from TodosController using Provider Providing TodosController in the widget tree Summary Further reading Building a Native Settings Application Using Material and Cupertino Widgets Technical requirements Understanding that everything is a widget Setting up the project Building a platform-specific UI Building an iOS-specific UI with CupertinoApp Building an Android-specific UI with MaterialApp Summary Further reading Exploring Navigation and Routing with a Hacker News Clone Technical requirements Setting up the project Understanding navigation Imperative routing with Navigator 1.0 Declarative routing with Navigator 2.0 Simplifying Navigator 2.0 with GoRouter Summary Further reading Building a Simple Contact Application with Forms and Gesturess Technical requirements Setting up the project Building forms the manual way Building complex forms with the Form/FormField widgets Custom form validation Summary Further reading Building an Animated Excuses Application Technical Requirements Setting up the project Working with animations in Flutter Building implicit animations in Flutter Building implicit animations using Flutter’s animations package Summary Further reading Build an Adaptive, Responsive Note-Taking Application with Flutter and Dart Frog Technical requirements Setting up the project Introduction to responsiveness and adaptiveness Making an app responsive Making an app adaptive Creating REST endpoints for the Notes application Summary Further reading Writing Tests and Setting Up GitHub Actions Technical requirements Setting up the project Writing tests for the Flutter app Writing unit tests Writing widget and golden tests Exploring GitHub actions and repository quality Creating the GitHub workflow file Code coverage Summary Further reading Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share your thoughts
How to download source code?
1. Go to:
2. In the Find a repository… box, search the book title:
Cross-Platform UIs with Flutter: Unlock the ability to create native multiplatform UIs using a single code base with Flutter 3, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.