Flutter (53): rebuild on demand (ValueListenableBuilder)

Flutter (53): rebuild on demand (ValueListenableBuilder)

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 ···
views:255
Flutter (52): Colors and themes

Flutter (52): Colors and themes

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···
views:207
Flutter (51): Sharing state across components

Flutter (51): Sharing state across components

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···
views:255
Flutter (50): Data Sharing (InheritedWidget)

Flutter (50): Data Sharing (InheritedWidget)

50.1 InheritedWidgetFirst, we will introduce the InheritedWidget component and then focus on the relationship between the didChangeDependencies callback in the State class and the InheritedWidget.1. I···
views:202
Flutter (47): Custom Sliver

Flutter (47): Custom Sliver

In this section, we will explain the Sliver layout protocol and the process of creating custom Slivers by customizing two Slivers.47.1 Sliver Layout ProtocolThe layout protocol for Sliver is as follow···
views:268
Flutter (46): CustomScrollView and Slivers

Flutter (46): CustomScrollView and Slivers

46.1 CustomScrollViewPreviously introduced widgets like ListView, GridView, and PageView are all complete scrollable components. "Complete" means that they include Scrollable, Viewport, and ···
views:227
Flutter (45):TabBarView

Flutter (45):TabBarView

The TabBarView is a layout component provided by the Material widget library, often used in conjunction with the TabBar.45.1 TabBarViewTabBarView encapsulates PageView, and its constructor is straight···
views:297
Flutter (44): Scrollable component child cache

Flutter (44): Scrollable component child cache

General Solution for Caching Specific Items in Scrollable WidgetsIn this section, we’ll introduce a general solution for caching specific items within scrollable widgets.First, let’s recall that whe···
views:224
Flutter (43): PageView and page cache

Flutter (43): PageView and page cache

43.1 PageViewIf you want to implement page transitions and tab layouts, you can use the PageView widget. It’s important to note that PageView is a very significant widget, especially in mobile develo···
views:294
Flutter (42): GridView

Flutter (42): GridView

A grid layout is a common layout type, and the GridView widget is used to implement this layout in Flutter. This section focuses on its usage.42.1 Default ConstructorGridView can build a two-dimension···
views:274
Flutter (41):animated list

Flutter (41):animated list

AnimatedList and ListView have similar functionalities, but the key difference is that AnimatedList can perform animations when inserting or deleting items in the list. This feature enhances the user ···
views:244
Flutter (40): Scroll monitoring and control

Flutter (40): Scroll monitoring and control

In the previous sections, we introduced commonly used scrollable components in Flutter and mentioned that the scroll position of these components can be controlled using ScrollController. This section···
views:252
Flutter (39): ListView Overview

Flutter (39): ListView Overview

ListView is one of the most commonly used scrollable widgets. It can arrange all child widgets linearly in one direction, and it also supports lazy loading of list items (only creating them when neede···
views:182