Layout widgets typically contain one or more child widgets, and different layout widgets arrange (or layout) their child widgets in various ways, as shown in Table 4-1 below:WidgetDescriptionUsageLeaf···
The Material component library provides two types of progress indicators: LinearProgressIndicator and CircularProgressIndicator. Both can be used to indicate either a precise progress or an indetermin···
The Material component library provides the TextField input box component and the Form component. Let's introduce them one by one.20.1 TextFieldThe TextField is used for text input and offers many···
3.4.1 IntroductionThe Material component library provides Material-styled switches (Switch) and checkboxes (Checkbox). Although both inherit from StatefulWidget, they do not maintain their selected st···
3.3.1 ImagesIn Flutter, we can use the Image widget to load and display images. The image source can be from assets, files, memory, or the internet.1. ImageProviderImageProvider is an abstract class t···
The Material component library provides various button components such as ElevatedButton, TextButton, OutlinedButton, and others. All of these buttons are either directly or indirectly custom wrappers···
16.1 TextThe Text widget is used to display simple styled text. It contains several properties for controlling the appearance of the text. Here’s a simple example:Text("Helloworld",textAlig···
Before introducing Flutter's exception handling, it is essential to understand Dart's single-threaded model. Only by knowing Dart's code execution process can we determine where to capture···
14.1 Logs and Breakpoints1. The debugger() StatementWhen using the Dart Observatory (or another Dart debugger, such as the one in IntelliJ IDE), you can insert programmatic breakpoints using the debug···
In a Flutter app, the installation package contains both code and assets. Assets are resources that are bundled into the installation package and can be accessed at runtime. Common asset types include···
2.5.1 IntroductionIn software development, there are often libraries or SDKs that many projects may need to use. To improve development efficiency, these common codes can be extracted into an independ···
11.1 A Simple ExampleIn mobile development, a "Route" generally refers to a "Page." This concept is similar to the idea of a Route in single-page applications (SPA) in web developm···
10.1 IntroductionIn reactive programming frameworks, "state management" is an eternal topic. Whether it's in React/Vue (both are web development frameworks that support reactive programm···
2.2.1 The Concept of WidgetFrom the previous introduction, we know that in Flutter, almost all objects are widgets. Unlike the concept of "controls" in native development, widgets in Flutter···
2.1.1 Creating a Flutter Application Template1. Creating the ApplicationUse either Android Studio or VS Code to create a new Flutter project named "first_flutter_app". Once created, you will···
7.1 Variable Declaration#1) var KeywordSimilar to the var in JavaScript, it can receive variables of any type. However, the biggest difference is that in Dart, once a var variable is assigned a value,···