66.1 IntroductionSometimes, we may need complex animations that consist of a sequence of animations or overlapping animations. For example, consider a bar chart where the height increases while changi···
65.1 Implementing Custom Hero AnimationFor example, we have a profile picture component that initially displays a small circular image. We want to implement a feature that allows users to click and vi···
Route Management and Custom Route Transition AnimationsIn the "Route Management" section, we mentioned that the Material component library provides a MaterialPageRoute component, which uses ···
63.1 Basic Structure of AnimationIn Flutter, animations can be implemented in various ways. Below, we will demonstrate the differences between different animation implementations in Flutter using an e···
62.1 Basic Principles of AnimationIn any UI framework, the principle of implementing animations is the same: rapidly change the UI appearance multiple times over a period. Due to the phenomenon of vis···
Notifications are an important mechanism in Flutter. In the widget tree, each node can dispatch notifications, which propagate upward through the current node, allowing all parent nodes to listen to t···
In an app, we often need a broadcasting mechanism for cross-page event notifications. For example, in a login-required app, pages need to listen for user login or logout events to update their states ···
59.1 Principles of Gesture RecognitionGesture recognition and handling occur during the event dispatch phase. GestureDetector is a StatelessWidget that contains RawGestureDetector. Let’s take a look ···
58.1 Flutter Event Handling ProcessThe Flutter event handling process primarily consists of two steps. To focus on the core flow, we will use user touch events as an example:Hit Testing: When a finger···
57.1 GestureDetectorThis section introduces the GestureDetector and GestureRecognizer used in Flutter to handle gestures, followed by a detailed discussion on gesture competition and conflict.GestureD···
56.1 Introduction to Raw Pointer EventsThis section introduces raw pointer events (Pointer Event, typically touch events on mobile devices), while the next section will cover gesture handling.In mobil···
This section will provide a detailed overview of how to use dialogs in Flutter, including their implementation principles, style customization, and state management.55.1 Using DialogsDialogs are essen···
Many times, we rely on asynchronous data to dynamically update the UI. For example, when opening a page, we might need to fetch data from the internet first. During this data retrieval, we display a l···
53.1 ValueListenableBuilderInheritedWidget provides a way to share data from top to bottom within the widget tree, but there are many scenarios where the data flow is not strictly top-to-bottom, such ···
52.1 ColorsBefore introducing themes, let’s first take a look at the Color class in Flutter. Colors in the Color class are represented as an int value. We know that the color on a display is composed···
51.1 Synchronizing State through EventsIn Flutter development, state management is an enduring topic. The general principle is: if the state is private to a component, it should be managed by that com···