mirror of
https://github.com/block/buzz.git
synced 2026-11-28 20:22:39 +00:00
scrollable_positioned_list keys every item by index. The chat list is reversed, so a new message moves every row to a new key and Flutter remounts every built row: hooks, markdown parses and image listeners. Add an optional findChildIndexCallback to the vendored package. With it set, an item keeps its own key and the callback finds its new index, the way ListView does. Item positions now read the index from the item wrapper instead of its key. The chat timeline maps each row key to its index. Co-authored-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
1.0 KiB
1.0 KiB
Vendored scrollable_positioned_list
- Source: pub.dev
scrollable_positioned_list0.3.8, from google/flutter.widgets. - Archive sha256:
1b54d5f1329a1e263269abc9e2543d90806131aa14fe7c6062a8054d57249287 - License: BSD-3-Clause, in
LICENSE. - Copied:
lib/,LICENSE,README.md,CHANGELOG.md,pubspec.yaml, unchanged except one trailing space trimmed fromREADME.md. The example and tests were left out.
Local changes
The upstream package keys every item by its index, so inserting a message
at the bottom of a reversed chat moves every item to a new key and remounts
every built row. The change adds an optional findChildIndexCallback to
ScrollablePositionedList. When it is set, an item whose widget has a key
keeps that key in the list, and the callback finds its new index.
Without the callback, the package behaves as upstream.