watch method

Widget watch({
  1. required Widget builder(
    1. BuildContext context,
    2. ItemView<K, Section, Item> view
    ),
  2. 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,
  );
}