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···
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···
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···
48.1 NestedScrollViewIn the previous section, we learned that CustomScrollView can only combine Slivers. If there are child components that are also scrollable (embedded through SliverToBoxAdapter) an···
46.1 CustomScrollViewPreviously introduced widgets like ListView, GridView, and PageView are all complete scrollable components. "Complete" means that they include Scrollable, Viewport, and ···
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···
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 ···
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···
37.1 Sliver Layout ModelIn Section 4.2, we introduced that Flutter has two layout models:The box model layout based on RenderBox.The list layout based on Sliver (RenderSliver), which supports lazy loa···
34.1 Clipping WidgetsFlutter provides several clipping widgets to clip components:Clipping WidgetDefault BehaviorClipOvalClips a square child into a circle or a rectangular child into an ellipse.ClipR···