Book Description Flutter in Action teaches you to build professional-quality mobile applications using the Flutter SDK and the Dart programming language. You’ll begin with a quick tour of Dart essentials and then dive into engaging, well-described techniques for building beautiful user interfaces using Flutter’s huge collection of built-in widgets. The combination of diagrams, code examples, and annotations makes learning a snap. As you go, you’ll appreciate how the author makes easy reading of complex topics like routing, state management, and async programming. Show and hide more
Table of Contents
Copyright Brief Table of Contents Table of Contents Foreword Preface Acknowledgments About This Book About the Author About the Cover Illustration Part 1. Meet Flutter Chapter 1. Meet Flutter 1.1. Why does Flutter use Dart? 1.2. On Dart 1.3. Who uses Flutter? 1.4. Who should be using Flutter? 1.5. Who this book is for 1.6. Other mobile development options 1.7. The immediate benefits of Flutter 1.8. Future benefits of Flutter: Web apps and desktop apps 1.9. A brief intro to how Flutter works 1.10. Flutter rendering: Under the hood 1.11. Final note Summary Chapter 2. A brief intro to Dart 2.1. Hello, Dart! 2.2. Common programming concepts in Dart 2.3. Control flow 2.4. Functions 2.5. Object-oriented programming (in Dart) Summary Chapter 3. Breaking into Flutter 3.1. Intro to the counter app 3.2. Widgets: The widget tree, widget types, and the State object 3.3. BuildContext 3.4. Enhancing the counter app with the most important widgets 3.5. Favor composition in Flutter (over inheritance) 3.6. Intro to layout in Flutter 3.7. The element tree 3.8. A final note Summary Part 2. Flutter user interaction, styles, and animations Chapter 4. Flutter UI: Important widgets, themes, and layout 4.1. Setting up and configuring a Flutter app 4.2. Structural widgets and more configuration 4.3. Styling and themes in Flutter 4.4. Common layout and UI widgets 4.5. ListView and builders Summary Chapter 5. User interaction: Forms and gestures 5.1. User interaction and gestures 5.2. Flutter forms 5.3. FormField widgets 5.4. Form UI and working with focus nodes 5.5. Managing form state with form methods Summary Chapter 6. Pushing pixels: Flutter animations and using the canvas 6.1. Introducing Flutter animations 6.2. CustomPainter and the canvas 6.3. Staggered animations, TweenSequence, and built-in animations 6.4. Reusable custom color transition widgets Summary Part 3. State management and asynchronous Dart Chapter 7. Flutter routing in depth 7.1. Routing in Flutter 7.2. Declarative routing and named routes 7.3. Routing on the fly 7.4. Routing animations Summary Chapter 8. Flutter state management 8.1. Deep dive into StatefulWidgets 8.2. Pure Flutter state management: The InheritedWidget 8.3. Blocs: Business Logic Components Summary Chapter 9. Async Dart and Flutter and infinite scrolling 9.1. Async Dart 9.2. Sinks and streams (and StreamControllers) 9.3. Using streams in blocs 9.4. Async Flutter: StreamBuilder 9.5. Infinite and custom scrollable widgets Summary Part 4. Beyond foundations Chapter 10. Working with data: HTTP, Firestore, and JSON 10.1. HTTP and Flutter 10.2. JSON serialization 10.3. Working with Firebase in Flutter 10.4. Dependency injection Summary Chapter 11. Testing Flutter apps 11.1. Tests in Flutter 11.2. Accessibility with the semantics widgets 11.3. Next steps with Flutter Summary Appendix A. Installation: Dart2 A.1. Installation: Dart2 A.2. Installation: Flutter SDK A.3. Tooling and a quick note on text editors A.4. DartPad Appendix B. The Pub package manager B.1. Hosted packages and versioning with Pub B.2. Using packages on your machine or from GitHub B.3. Using the packages Appendix C. Flutter for web developers C.1. The good news first C.2. How is layout handled in Flutter? Is there a flexbox equivalent? C.3. What about using an absolute position? C.4. What about the basics: Borders, padding, margin, and color? C.5. Manipulating text style C.6. Global styles Appendix D. Flutter for iOS developers D.1. What’s the equivalent of UIView in Flutter? D.2. What’s the paradigm or mental model difference? D.3. Can I build an app that uses iOS design patterns? D.4. How to I make complex layouts like UITableView? D.5. What’s similar to Storyboard? D.6. How do you draw to the screen? D.7. How do I add dependencies (like Cocoa Pods)? D.8. How do I interact with the device and use native APIs? D.9. Is there an equivalent to CoreData? Appendix E. Flutter for Android developers E.1. What’s the equivalent of a view in Flutter? E.2. What’s the paradigm or mental model difference? E.3. Where’s the XML layout file? E.4. How do I draw to the screen? E.5. What’s the equivalent of an intent in Flutter? E.6. What’s the equivalent of runOnUiThread() in Flutter? E.7. What’s the equivalent of a Gradle file? How do I add dependencies? E.8. What’s the equivalent of a LinearLayout? What about ScrollView? E.9. How do I access shared preferences or SQLite? Index List of Figures List of Tables List of Listings