The fifth issue of the 2024 Three Shopkeepers Book Donation Event: From Zero Basics to Proficient in Flutter Development

17376724:

Table of contents

  • Preface
  • Introduction to Flutter
  • Flutter learning path
  • About "From Zero Basics to Proficient in Flutter Development"
  • Editor's Choice
  • brief introduction
  • About the Author
  • Book catalog
  • Foreword/preface to the book
  • book excerpt illustration
  • A quick overview of the book "From Zero Basics to Mastering Flutter Development"
  • Conclusion

Abstract: This article will take readers step by step to learn and master Flutter development, which is a popular and powerful cross-platform application development framework. We will start from scratch, introduce the core concepts and basic knowledge of Flutter, and gradually delve into advanced topics and best practices to help you become a developer proficient in Flutter development.

Preface

As technology developers, everyone must be familiar with technology in the field of application development, especially mobile development and large front-end development. In the field of mobile application development, cross-platform development frameworks have become an increasingly popular choice. As a UI toolkit developed by Google, Flutter has the characteristics of rapid development, high performance and hot reloading, and has become the choice of many developers. First choice, let us embark on the journey of Flutter development together, from zero basics to mastery. This article will take readers step by step to learn and master Flutter development, a popular and powerful cross-platform application development framework. We will start from scratch, introduce the core concepts and basic knowledge of Flutter, and gradually delve into advanced topics and best practices to help you become a developer proficient in Flutter development.

Introduction to Flutter

As a mobile developer, you must be familiar with Flutter. In fact, Flutter is an open source mobile application development framework launched by Google. It is written in the Dart language and can quickly build high-performance, beautiful and cross-platform applications. Flutter has the following characteristics:

  • Rapid development: Flutter provides a wealth of UI components and development tools, which can quickly build beautiful user interfaces, and preview and debug application changes in real time through the hot reload function.
  • Cross-platform: Flutter supports running on iOS and Android platforms at the same time. You only need to write one set of code to generate applications for both platforms, reducing development and maintenance costs.
  • High performance: Flutter uses its own rendering engine to draw UI components directly, avoiding interaction delays with the platform and providing a smooth user experience.
  • Rich UI components: Flutter provides a rich set of built-in UI components, allowing developers to easily build various complex user interfaces.

Flutter learning path

Let’s briefly share the entire path of Flutter learning, as follows:

Step 1: Install Flutter and set up the development environment

Let’s do the preparatory work first. First, we need to install the Flutter SDK and set up the development environment. We can download and install the corresponding SDK from the Flutter official website, and configure the development environment according to the official documentation.

Step 2: Learn Dart language basics

The next step is to learn the basics of Dart language, that is, learn its basic usage. Since Flutter uses Dart language for development, it is recommended to understand the basic knowledge of Dart language before learning Flutter. You can read Dart official documents, reference books or online Video tutorials to learn the syntax and features of the Dart language.

Step 3: Master the core concepts of Flutter

Then when learning the core concepts of Flutter, you also need to understand the following key concepts:

  • Widget: Everything in Flutter is a widget, and they are the basic elements for building a user interface. It is very important to learn different types of widgets and the combination and nesting relationships between them.
  • Layout: Understanding the layout system in Flutter, such as Container, Row, Column, etc., can help you organize and adjust the position and size of UI components effectively.
  • State management: Master the state management methods in Flutter, such as setState, Provider, Bloc, etc., to better manage and update the status of the application.
  • Network Requests: Learn how to use Flutter to make network requests and handle asynchronous operations for data interaction with backend servers.

Step 4: Practice Projects and Examples

After learning the theoretical knowledge above, practice and use it in practice. Doing it is the only way to verify whether you have mastered it. Mainly through practical projects and examples, we can apply the previously learned knowledge to actual development. We can try to write simple Flutter applications, such as counter applications or to-do list applications, to consolidate the concepts learned.

Step 5: Advanced Topics and Best Practices

The last step is to consolidate and strengthen. Once we have mastered the basic knowledge and skills of Flutter, we can further learn the following advanced topics and best practices. Here are a few important points:

  • Animations and Transitions: Learn how to create animations and transitions in Flutter apps to enhance the user experience.
  • Routing and navigation: Understand the routing and navigation mechanism in Flutter to achieve switching and navigation between pages.
  • Data persistence: Learn how to perform data persistence in Flutter applications, such as using SQLite databases or Shared Preferences to store data.
  • Performance Optimization: Learn how to optimize the performance of Flutter applications, reduce memory usage and improve response speed.
  • Testing and debugging: Be familiar with Flutter’s testing framework and debugging tools to ensure the quality and stability of your application.

Step 6: Keep practicing and learning deeply

In addition, to become a developer proficient in Flutter development, you need continuous practice and in-depth learning, participate in more discussions in the Flutter developer community, read Flutter-related blogs and documents, maintain a timely grasp and update of Flutter technology, and Trying to solve challenges in real projects is an effective way to improve your skills and knowledge.

Summary: Through the above steps, we can gradually go from zero basics to proficient in Flutter development. Everyone needs to remember that learning is a gradual process that requires continuous practice and practice. I wish everyone success on the road to Flutter development!

About "From Zero Basics to Proficient in Flutter Development"

Next, I would like to recommend a book that is essential for learning about Flutter development. This is a practical book about getting started with Flutter development. At the same time, this book is the first technical book written by the third shopkeeper of this blogger. It will be popular once it is launched. It has reached the top of Dangdang's "Computer and Internet" book rankings. A set of codes to build beautiful applications for multiple platforms. This book starts from real development scenarios and completely explains the Flutter framework, helping you quickly master the basic knowledge and development skills of Flutter, and helping you succeed in the field of mobile application development! In addition, follow the blogger of this article, like + bookmark this article , and comment " I want to be proficient in Flutter development " in the comment area of ​​this article . Three lucky readers will be selected to receive a paper copy of "From Zero Basics to Mastery of Flutter Development". The deadline is Time: 2024.01.31 .

Start the portal of "From Zero Basics to Proficient in Flutter Development": "From Zero Basics to Proficient in Flutter Development, Develop a Set of Codes and Build Multi-Platform Beautiful Applications Chen Zheng" (Chen Zheng) [Introduction_Book Review_Online Reading] - Dangdang Books or https://item.m.jd.com/product/13820697.html , I personally think this book is very good, especially for developers who want to get started and are proficient in Flutter development. It is a rare and good book. , worth having and learning.

Editor's Choice

Writing a book is a very energy-consuming thing, and those who are willing to invest energy are basically sentimental. This is not a simple introductory book to Flutter, but an easy-to-understand book that goes from shallow to deep and can improve your Flutter knowledge system. Whether you want to get started with Flutter or want to practice in depth, this book is worth referencing. (SegmentFault front-end manager robin)

Using a set of codes to build beautiful applications for multiple platforms is the original design intention of Flutter, and it is also the trend of rapid iterative product development. This book combines theory with practice, starting from the shallower to the deeper, and can truly take you to experience the pleasure that Flutter brings to efficient development in the current mobile Internet era. (Rao Mingjing, product research and development project leader of Tiandi Sunshine Communication Technology Co., Ltd.)

The author combines his rich practical development experience to share technical ideas for solving practical problems. This book starts from real development scenarios and completely explains the Flutter framework. I believe this book can help you quickly understand, master and apply this technology. (Teacher at Nanyang Institute of Technology, Ph.D., associate professor, master's tutor Wang Yufeng)

Whether you are doing it for personal interest or professional development, this book will become a treasure resource for you, helping you quickly master the basic knowledge and development skills of Flutter, and help you succeed in the field of mobile application development! (CSDN blog/learning leader Wang Lumin)

In this era where free tutorials, videos, and article resources are everywhere, it is really valuable to learn a new technology through a book! What's more, this is a book with detailed content and a combination of basic theory and practical experience. This book is perfect for beginners, worth reading and worth keeping on hand! (Zhao Meng, head of CSDN Enterprise Service Community Ecology)

brief introduction

This book leads readers into the world of Flutter development from the shallower to the deeper. It starts from the origin of Flutter, and gradually goes into the advanced practice of Flutter. At the end, it is combined with practical project cases, so that readers can not only systematically learn the relevant knowledge of Flutter programming, but also You can also have a deeper understanding of Flutter application development.

This book is divided into three parts: The first part is the introductory chapter (Chapter 1~4), which mainly introduces the birth background, characteristics, language and use of common components of Flutter technology. By studying this chapter, readers can master how to use Flutter to Build the UI interface; the second part is the advanced chapter (Chapter 5~11), which mainly includes Flutter's gesture and event processing, animation, custom components, file operations and network requests, routing navigation and storage, hybrid cross-platform development, Internationalization, etc., through studying this article, readers can have an in-depth understanding of the overall process and principles of Flutter; the third part is the practical chapter (Chapter 12~14), which mainly integrates the previously introduced content through a practical project It is put together and combined with one-line processes such as Flutter application release and Flutter App upgrade, allowing readers to have an overall understanding of developing a complete Flutter App.

The content of this book not only contains a large number of examples, pictures, tables, but also corresponding supporting example source codes, which can help readers gradually master Flutter development technology. It is also easy to understand, rich in content, and highly practical, especially suitable for introductory readers of Flutter language. It is suitable for advanced readers and other programming enthusiasts in mobile development. In addition, this book is also suitable as a teaching material for relevant training institutions.

About the Author

Chen Zheng, pen name: San Zhanggui, one of the first signed authors of InfoQ writing platform, manager of CSDN Shanghai Urban Developer Community and Artificial Intelligence Technology Developer Community, 2023 Open Atomic School Source Line Open Source Ambassador, Open Source Lecturer, Careerfocus Special Lecturer, Tencent Cloud developer community creative leader, 2023 super individual, CSDN blog expert, Alibaba Cloud technology community expert blogger, 51CTO community blog expert, Google Developer Conference special visit KOL, Tencent Cloud developer community 2022 "Excellent Creator" , Friends League Question and Answer Officer.

A high-quality creator in the field of big front-end, "Big Front-end Series" column, the content of the article is easy to understand, from simple to deep, aiming to help people in need; he has been deeply involved in the field of big front-end for many years, combines theory with practice, and has rich experience in big front-end development.

Book catalog

Chapter 1 Flutter Overview

1.1 Development History of Mobile Terminal Development 2

1.2 Introduction to Flutter 3

1.3 Flutter framework 3

1.4 Why use Flutter4

1.5 Summary 4

Chapter 2 First introduction to Flutter

2.1 Set up development environment 6

2.1.1 Download Flutter SDK6

2.1.2 Set mirror address and environment variables 7

2.1.3 Install and set up Android Studio8

2.1.4 Install Visual Studio Code and Flutter development plug-in 9

2.1.5 IDE usage and configuration 10

2.1.6 Install Xcode10

2.1.7 Check Flutter development environment 11

2.2 Flutter upgrade 11

2.3 Create Flutter sample project 11

2.4 Project directory structure description 14

2.5 Program Debugging 14

2.5.1 iOS mobile phone debugging 14

2.5.2 Android phone debugging 16

2.6 Experience hot reload18

2.7 Summary 18

Chapter 3 Introduction to Dart Language

3.1 Dart language 20

3.1.1 What is Dart20

3.1.2 Dart features 20

3.1.3 Dart’s mechanism 20

3.2 Dart’s built-in data types 20

3.2.1 String type 21

3.2.2 Numeric types 21

3.2.3 Boolean type 21

3.2.4 List type 22

3.2.5 Dictionary type 22

3.3 Declaration of variables and constants 22

3.4 Function definition 23

3.4.1 Ordinary functions 23

3.4.2 Optional parameters 23

3.4.3 Anonymous functions 24

3.4.4 Arrow functions 24

3.5 Conditional expressions and operators 24

3.5.1 Decision Operator 25

3.5.2 Ternary operation expression 25

3.5.3 Cascading operators 25

3.5.4 Non-empty determiner 25

3.6 Branches and Loops 26

3.6.1 if…else26

3.6.2 switch26

3.6.3 for loop and while loop 27

3.6.4 List traversal 28

3.6.5 Map traversal 28

3.7 Defining classes 28

3.7.1 Constructor 28

3.7.2 Operator overloading 29

3.7.3 Usage of extends, with, implements and abstract 30

3.7.4 Defining private variables 31

3.8 Import package 31

3.9 Exception catching 32

3.10 Asynchronous operations 33

3.11 Generics 34

3.12 Note 35

3.13 Summary 35

Chapter 4 Flutter Components

4.1 Widget37

4.1.1 The concept of Widget 37

4.1.2 Widget and Element37

4.1.3 StatelessWidget37

4.1.4 StatefulWidget38

4.1.5 State40

4.2 Status management 41

4.3 Basic components 41

4.3.1 Text component 41

4.3.2 TextField component 45

4.3.3 Image component 46

4.3.4 Button component 47

4.3.5 Container component 48

4.3.6 Row and Column components 49

4.3.7 Flex Component 50

4.4 Material style components 51

4.4.1 MaterialApp51

4.4.2 Scaffold52

4.4.3 AppBar53

4.4.4 BottomNavigationBar54

4.4.5 TabBar56

4.4.6 Drawer 57

4.5 Cupertino Style Components 58

4.5.1 CupertinoActivityIndicator58

4.5.2 CupertinoAlertDialog58

4.5.3 CupertinoButton59

4.5.4 CupertinoSlider60

4.5.5 CupertinoSwitch61

4.6 Container components 62

4.6.1 Padding 62

4.6.2 Center 62

4.6.3 Align 63

4.6.4 AspectRatio (fixed aspect ratio) 63

4.6.5 Transform 64

4.6.6 Stack 64

4.6.7 Wrap (flow layout) 64

4.6.8 Flow65

4.7 Scroll Component 66

4.7.1 ListView66

4.7.2 GridView66

4.7.3 Table69

4.7.4 ExpansionTile (folding) 70

4.8 Summary 71

Chapter 5 Gestures and Event Handling

5.1 Raw pointers 73

5.2 GestureDetector73

5.3 GestureRecognizer76

5.4 Event bus 78

5.5 Summary 79

Chapter 6 Animation

6.1 Introduction to Flutter animation 81

6.2 Basic use of animation 82

6.3 Animation status monitoring 84

6.4 Interweaving animation 85

6.5 Hero animation 87

6.6 AnimatedList animation 89

6.7 Summary 91

Chapter 7 Custom Components

7.1 Introduction to custom component methods 93

7.2 Assembling existing components 93

7.3 Using CustomPaint with Canvas 95

7.4 Summary 97

Chapter 8 File Operations and Network Requests

8.1 Get iOS and Android file paths 99

8.2 Daily operations of folders 99

8.3 Daily operations of files 100

8.4 HTTPClient network request 101

8.5 Introduction and use of dio library 102

8.6 JSON to Model class 103

8.7 Summary 105

Chapter 9 Routing Navigation and Storage

9.1 Routing Navigation 107

9.2 Named routing rules 108

9.3 Using shared_preferences to store data 110

9.4 Using SQLite to store data 111

9.5 Summary 115

Chapter 10 Hybrid Cross-Platform Development

10.1 Development Package117

10.2 Introduction to platform channels 117

10.3 Development of Flutter plug-ins 117

10.4 Implementation of Android plug-in API 121

10.5 Implementation of iOS plug-in API 121

10.6 Summary 122

Chapter 11 Internationalization

11.1 Let the developed App support multiple languages ​​124

11.2 Monitoring system language switching 124

11.3 Let the developed UI support multiple languages ​​125

11.4 Using the Intl package 127

11.5 Summary 130

Chapter 12 Project Practice

12.1 Application introduction 132

12.2 Application data 133

12.3 Body style 134

12.4 Routing management 136

12.5 State management solution 137

12.6 Login interface 139

12.7 Message display interface 142

12.8 To-do interface 143

12.9 Attendance punch-in interface 148

12.10 Personal center interface 151

12.11 Summary 157

Chapter 13 Publishing Flutter Applications

13.1 JIT and AOT159

13.2 Packaging on Android 159

13.3 Packaging on iOS 163

13.4 Performance Debugging 166

13.5 Use of development aids 166

13.6 App launched 167

13.7 Summary 168

Chapter 14 App upgrade function

14.1 App upgrade function preview and function analysis 170

14.2 Android platform jumps to the application market for updates 170

14.3 iOS platform jumps to the App Store for updates 171

14.4 Summary 172

Foreword/preface to the book

Since Google launched Flutter in 2018, due to its high development efficiency, good performance, beautiful UI interface and Google's highly recommended support, Flutter has developed rapidly and has been popular among developers, gaining more and more benefits. Much attention.

The author has been engaged in the development of mobile apps and is always paying attention to the development direction of big front-end technology. After Flutter was just released, the author began to understand and study this emerging framework, and later applied it to actual development. After project practice, the author feels that Flutter can replace traditional mobile native development. Its high development efficiency, beautiful UI interface and cross-platform consistency have "conquered" more and more developers and enterprises. Flutter is widely used around the world. More and more well-known large companies are using Flutter to develop applications, and its goal is to realize application development in the large front-end field (mobile terminal, PC terminal, Web terminal) and become a real High-performance, cross-platform technology solution.

Flutter's outstanding performance has won the favor of more and more developers, and many developers have switched to learning Flutter technology. Driven by many fans, the Flutter community is becoming more and more complete. Flutter officials have also shortened the update cycle of new features. Flutter’s documentation, resources, plug-ins, etc. are becoming more and more complete, so we have reason to believe that Flutter will become more and more popular. Well, it is bound to become a more mature and mainstream cross-platform development technology solution.

Based on this, the author wants to summarize his experience in Flutter development into a book to help readers learn Flutter technology from scratch. The author took this book very seriously, from the outline planning to the writing, to the subsequent improvement of the content, and put a lot of effort into it, in order not to disappoint the readers.

This book introduces Flutter technology from shallow to deep, covers almost all core knowledge points involved in Flutter development, and embodies the whole process of learning from zero basics to proficiency. This book systematically explains the knowledge points of Flutter technology, which are often used in actual development. It is suitable for both beginners and professional technical developers. If the reader has experience in mobile or front-end development, the experience of reading this book will be better. The content of each chapter in this book is relatively independent. You can read it in order, or you can read the required content through the table of contents.

Here, the author sincerely hopes that readers can study Flutter technology seriously, because if you can learn and master a promising new technology, then you will most likely become the leader of this technology and gain the greatest harvest.

I hope to grow and progress with you through this book, and let us look forward to a better future for Flutter together!

There is a lot of profound knowledge in the field of Flutter development. The author tried his best to cover all aspects of Flutter during the writing process. However, due to the rush of time, there will inevitably be some omissions and deficiencies in the book (given that the sample codes in this book are all based on Flutter It is introduced from the official component library, and the official version of Flutter is updated very frequently, so it is inevitable that there will be some earlier usage methods in the book, etc.), readers are kindly requested to criticize and correct it. Readers can communicate with the author through email [email protected]. In addition, readers are also welcome to follow the author's WeChat public account sanzhanggui777. The author will regularly share some technical articles.

Warm reminder : The source code involved in this book has been uploaded to Baidu Cloud Disk for readers to download. Readers are asked to follow the WeChat official account of "Boya Book Club" on the back cover, find the "Resource Download" column, enter the resource download code on page 77 of the book, and follow the prompts to obtain it.

book excerpt illustration

A quick overview of the book "From Zero Basics to Mastering Flutter Development"

Conclusion

Through the introduction of this article, everyone must have a deeper understanding of Flutter development, especially readers who are engaged in mobile development and large front-end development. Through step-by-step learning and practice, you can gradually master Flutter development from scratch. Moreover, Flutter, as a powerful and flexible cross-platform development framework, provides application client developers with the perfect tool to build high-performance, beautiful and cross-platform applications. Therefore, Flutter is a very important tool for application developers. A good technology stack choice. Finally, I hope that this article can provide inspiration and guidance for readers. I wish everyone success in the development of Flutter. Come on!

Guess you like

Origin blog.csdn.net/CC1991_/article/details/135837998