Mastering Flutter Learn to develop Flutter apps for iOS, Android, desktop and web (Kevin Moore) (z-library.sk, 1lib.sk, z-lib.sk)

Author: Kevin Moore

历史

No Description

📄 File Format: PDF
💾 File Size: 18.9 MB
8
Views
0
Downloads
0.00
Total Donations

📄 Text Preview (First 20 pages)

ℹ️

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

📄 Page 1
(This page has no text content)
📄 Page 2
(This page has no text content)
📄 Page 3
Mastering Flutter Learn to develop Flutter apps for iOS, Android, desktop and web Kevin Moore www.bpbonline.com
📄 Page 4
First Edition 2025 Copyright © BPB Publications, India ISBN: 978-93-65899-177 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true to correct and the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information. www.bpbonline.com
📄 Page 5
Dedicated to My wife, two sons and two cats
📄 Page 6
About the Author Kevin Moore is currently working as a Flutter developer for two companies and has been an Android developer for over 14 years and a Flutter developer for over 4 years. He has written several books on mobile development, including Android, Flutter, and Kotlin Multi-platform. He is a Google Developer Expert in Flutter and speaks at conferences around the country.
📄 Page 7
About the Reviewers ❖ Randal Schwartz is a self-taught programmer, writer, trainer, and new media host with a passion for technology and creative pursuits. Throughout his career, Randal has honed his skills in various programming languages, including Perl, Dart, and Flutter, and has become a recognized expert in the field. Notably, he has authored several influential books on Perl programming, including "Programming Perl," "Learning Perl," and "Effective Perl Programming.” He is currently recognized as a Google Developer Expert in the areas of Dart and Flutter (one of 10 in the United States and 150 in the world). Randal's professional journey has taken him through diverse roles, from software developer and system administrator to consultant and technical writer. He has contributed his expertise to numerous organizations, including Stonehenge Consulting Services, Inc., O'Reilly & Associates, and TWiT.tv, where he hosted the popular show "FLOSS Weekly." Beyond his technical prowess, Randal is also a gifted communicator and educator. He has lectured at conferences, provided technical training, and shared his insights through magazine articles and online platforms. Randal's unique blend of technical expertise, writing talent, and engaging personality has made him a sought- after speaker, author, and consultant in the tech industry.
📄 Page 8
❖ Roman Jaquez is a Google Developer Expert in Flutter as well as a Google Certified Cloud Architect who loves sharing his passion for Flutter with the wider developer community. He is also the lead organizer at GDG Lawrence and has 10+ years of experience as a software engineer. He enjoys spreading the word about best practices in the industry, ranging from mobile, web, and cloud.
📄 Page 9
Acknowledgement I would like to express my gratitude to all those who contributed to the completion of this book. First and foremost, I extend my heartfelt appreciation to my family and friends for their unwavering support and encouragement throughout this journey. Their love and encouragement have been a constant source of motivation. I would like to extend a special thanks to the following individuals for their valuable input and contributions to this project: Simon Lightfoot, Randal Schwartz, Roman Jaquez, and Scott Stoll. Thank you for your invaluable support and all the things you have taught me. I would also like to thank Yiru Gan for the incredible design on the Movie App. I am immensely grateful to BPB Publications for their guidance and expertise in bringing this book to fruition. Their support and assistance were invaluable in navigating the complexities of the publishing process. Last but not least, I want to express our gratitude to the readers who have shown interest in the book. Your support and encouragement have been deeply appreciated. Thank you to everyone who has played a part in making this book a reality.
📄 Page 10
Preface Flutter has become one of the most popular multi-platform frameworks available. While others have died out, Flutter continues to grow stronger and have a larger community. It has done so because it is easy to use and easy to create apps for every major platform. Instead of learning each platform and language, you can just learn one. Comprising nineteen chapters, this book covers a wide range of topics essential for learning Flutter. From the Dart programming language needed to write Flutter apps, to the widget system provided by Flutter you will learn everything you need to start creating apps for every platform. Chapter 1: Introduction to Flutter - Learn all about Flutter and why you should use it. Learn how to install Flutter and get started. You will also choose which IDE you will use to develop apps. You will learn about the Flutter architecture and the basics of how it is put together. Chapter 2: Dart Essentials - Learn about the Dart programming language that is used to write Flutter apps. Dart is a modern programming language with a lot of great features. You will need to know this language if you are to write Flutter apps. You will learn about basic programming fundamentals like variables, control flow, functions, and classes, as well as some more advanced topics like null safety. Chapter 3: Building the Movie App - Learn about the app you will build with this book. This is a beautiful app that showcases popular movies and allows users to learn all
📄 Page 11
about the movie and the cast. You will start the app from scratch, learning how to create your own apps. You will also learn about the different types of widgets Flutter uses. Finally, you will learn about the amazing hot reload feature of Flutter that allows you to keep changing your app while it is running and not have to rebuild each time. Chapter 4: Basic Widgets - Get started with learning some of the most important widgets that Flutter offers. Mastering these building block widgets will help you build screens. Chapter 5: Themes, Colors and Fonts - An app is boring and ugly unless you have a good set of consistent colors and fonts. Learn how to create a theme that has the colors and fonts you need to build the movie app. Chapter 6: State Management Fundamentals - How you manage the state of your data will either make your programming life difficult or easy. Learn some of the state management packages available to Flutter developers. Chapter 7: Advanced Widgets - Now that you know the basic widgets, learn more advanced widgets like ListViews, Grids, Cards, and Slivers. Chapter 8: Navigation and Routing - Learn an easy way to transition from one page to another. Learn how to push and pop pages with ease. Chapter 9: Animations and Transitions - Let your app look professional with engaging animations. Chapter 10: Futures and Async/Await - Prevent your UI from slowing down by performing background tasks asynchronously. Learn all about Dart’s Futures. Chapter 11: Networking - Learn how to retrieve data from the cloud. This is really important as there is a lot of great information out there to show your users.
📄 Page 12
Chapter 12: Local Storage and Databases - Learn how to save data for both simple and complex data needs. Learn about shared preferences for simple data and databases for more complex needs. Chapter 13: Web and Desktop - Now that you have created mobile apps, learn how to develop for the desktop (both the Mac and Windows) and the web. Chapter 14: Handling User Input and Gestures - Learn how to handle input from the user, from text fields, and gestures to focus management. Chapter 15: Firebase - Learn how to use one of the most popular cloud databases to store your data remotely. Chapter 16: Packages - Learn how to create your own Dart package. This is really useful to create shared code, either for yourself, your team, or others in the community. Chapter 17: Platform Channels and Plugins - Learn about how you can write code that runs natively on each platform. This is useful if you cannot find a plugin that does what you need. You will build a plugin to save and retrieve native preferences. Chapter 18: Testing and Performance - Learn about the different types of testing, from unit to widget and then to integration. This will allow you to feel confident in your code and will show you any problems that may crop up when you are changing your code. You will also learn about the tools available to measure your app’s performance and find and fix those problems. Chapter 19: Building and Publishing - In this final chapter you will learn how to build release versions of your app and publish them to both the Google Play Store and the Apple App Store. This will allow you to reach your users on both platforms.
📄 Page 13
Code Bundle and Coloured Images Please follow the link to download the Code Bundle and the Coloured Images of the book: https://rebrand.ly/d0ff3b The code bundle for the book is also hosted on GitHub at https://github.com/bpbpublications/Mastering- Flutter. In case there’s an update to the code, it will be updated on the existing GitHub repository. We have code bundles from our rich catalogue of books and videos available at https://github.com/bpbpublications. Check them out! Errata We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors, if any, that may have occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at : errata@bpbonline.com Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family.
📄 Page 14
Did you know that BPB offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.bpbonline.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at : business@bpbonline.com for more details. At www.bpbonline.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on BPB books and eBooks. Piracy If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at business@bpbonline.com with a link to the material. If you are interested in becoming an author If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit www.bpbonline.com. We have worked with thousands of developers and tech professionals, just like you, to help them share their insights with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea. Reviews Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions. We at BPB can understand what you think about our products, and our authors can see your feedback on their book. Thank you! For more information about BPB, please visit www.bpbonline.com. Join our book’s Discord space Join the book’s Discord Workspace for Latest updates, Offers, Tech happenings around the world, New Release and Sessions with the Authors: https://discord.bpbonline.com
📄 Page 15
(This page has no text content)
📄 Page 16
Table of Contents 1. Introduction to Flutter Introduction Structure Objectives Overview of Flutter History Flutter architecture Benefits of Flutter Flutter’s language: Dart Installing Flutter SDK Windows macOS CocoaPods Flutter Doctor Development application Conclusion 2. Dart Essentials Introduction Structure Objectives Variables Built-in types
📄 Page 17
Null safety Control flow Branches If Switch Loops Functions Main function Anonymous functions Comments Single line comments Multi-line comments Documentation comments Imports Classes Constructors Mixins Enums Extensions Concurrency Async/Await Streams Exceptions Conclusion 3. Building the Movie App Introduction Structure Objectives
📄 Page 18
Creating the movie app Visual Studio Code Android Studio Widgets Stateless and stateful widgets Hot reload and debugging Movie app UI Movie architecture Clean architecture SOLID Folder structure First steps of the Movie app Conclusion 4. Basic Widgets Introduction Structure Objectives Flutter project structure pubspec.yaml Pubspec fields Lints lib folder Folders Scaffold, AppBar, and NavigationBar Widgets Scaffold AppBar BottomNavigationBar
📄 Page 19
Drawer Snackbar Containers, rows, and columns Container Column Rows Text, images, and icons Text Images Icons Buttons and more Buttons Selection Chips DatePicker PopupMenuButton Radio button Slider Switch TimePicker Text input Build movie app screens Movie row Conclusion 5. Themes, Colors and Fonts Introduction Structure Objectives Colors
📄 Page 20
Typography Material Design Google Fonts Themes Fully customized theme ColorScheme Material Theme Builder Light vs dark Creating a theme iOS Xcode Conclusion 6. State Management Fundamentals Introduction Structure Objectives Understanding state in Flutter Local versus app state Built-in State InheritedWidget State management with packages Provider BloC GetIt Redux MobX Immutable state Riverpod
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now
Back to List