watch method
Widget
watch({
- required Widget builder(
- BuildContext context,
- ItemView<
K, Section, Item> view
- Key? widgetKey,
Selectively rebuilds builder when this item's payload changes
via controller.updateItem. Does NOT trigger on indexInSection
changes (e.g., a sibling moves) or on reparenting — those are
structural and the row is rebuilt by the underlying SliverTree
as part of normal layout.
Implementation
Widget watch({
required Widget Function(
BuildContext context,
ItemView<K, Section, Item> view,
)
builder,
Key? widgetKey,
}) {
return _ItemViewListener<K, Section, Item>(
key: widgetKey,
controller: controller,
itemKey: key,
sectionKey: sectionKey,
builder: builder,
);
}