Skip to content

Pinned Message discussion #797

@nicolasbraun

Description

@nicolasbraun

Hello @demchenkoalex

Model

Would you be open to add a pinnedAt (and maybe pinnedBy) field on the model ? (or just pinned)

This seems like a standard feature, and Message being sealed it's quite complicated to add fields without a lot of code or "unsafe" code reading metadatas

Best way to have a sticky/floating header on reversed list

Since reversed list "start" is at the bottom sadly using a SliverPersistantHeader (more specificaly SliverFloatingHeader) as topWidget does not work to have a nice sliver that dissapears when scrolling top, appears when scroling a bit down.

Here the intended behavior using a non-reversed list , and how it behaves with a reversed one (make sense, those widgets are not made for this, not sure why it flashes though, on the dartpad demo demo it goes under the list).

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-06-01.at.14.58.00.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-06-01.at.14.58.31.mp4

Solutions

Currently I simply use a Column on top of the chatList, this works for my pinned messages, but I loose any possibility to hide/show on scroll, maybe we could expose the scrollNotifications(very low priority).

Could not find any better solution but happy to hear any idea. (don't want to use non-reversed list because of the performance issue we discussed in other issues + i like message being sticky to the bottom when the list is short, and this is quite hard to achieve with the non reversed list (i think it would required making it a non-sliver list and use SliverFillRemaining))

Sidenote on Composer

I was wondering why you used a Stack for the composer ? Seems more pratical to use a Column what would automatically anchor it at the bottom of the list, was it to be able to position it anywhere (not sure there is a usecase). Wonder if it would make the keyboa//rd handling / code easier on this part

I'm asking because this prevents bottom widgets to be properly sticky, has the scrollview goes behind the composer.
Example videos with a dummer SliverPersistentHeader (second one as the Composer offseted to see)

Recording.at.2025-06-01.15.55.19.mp4
Recording.at.2025-06-01.15.54.03.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions