feat(ui): add support for StreamMessageListView.shrinkWrap.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -52,6 +52,8 @@
|
|||||||
),
|
),
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- Added `StreamMessageListView.shrinkWrap` to allow users to shrink wrap the message list view.
|
||||||
|
|
||||||
🔄 Changed
|
🔄 Changed
|
||||||
|
|
||||||
- Deprecated `MessageTheme.linkBackgroundColor` in favor of `MessageTheme.urlAttachmentBackgroundColor`.
|
- Deprecated `MessageTheme.linkBackgroundColor` in favor of `MessageTheme.urlAttachmentBackgroundColor`.
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ class StreamMessageListView extends StatefulWidget {
|
|||||||
this.unreadMessagesSeparatorBuilder,
|
this.unreadMessagesSeparatorBuilder,
|
||||||
this.messageListController,
|
this.messageListController,
|
||||||
this.reverse = true,
|
this.reverse = true,
|
||||||
|
this.shrinkWrap = false,
|
||||||
this.paginationLimit = 20,
|
this.paginationLimit = 20,
|
||||||
this.paginationLoadingIndicatorBuilder,
|
this.paginationLoadingIndicatorBuilder,
|
||||||
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.onDrag,
|
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.onDrag,
|
||||||
@@ -135,6 +136,14 @@ class StreamMessageListView extends StatefulWidget {
|
|||||||
/// See [ScrollView.reverse].
|
/// See [ScrollView.reverse].
|
||||||
final bool reverse;
|
final bool reverse;
|
||||||
|
|
||||||
|
/// Whether the extent of the scroll view in the [scrollDirection] should be
|
||||||
|
/// determined by the contents being viewed.
|
||||||
|
///
|
||||||
|
/// Defaults to false.
|
||||||
|
///
|
||||||
|
/// See [ScrollView.shrinkWrap].
|
||||||
|
final bool shrinkWrap;
|
||||||
|
|
||||||
/// Limit used during pagination
|
/// Limit used during pagination
|
||||||
final int paginationLimit;
|
final int paginationLimit;
|
||||||
|
|
||||||
@@ -550,6 +559,7 @@ class _StreamMessageListViewState extends State<StreamMessageListView> {
|
|||||||
physics: widget.scrollPhysics,
|
physics: widget.scrollPhysics,
|
||||||
itemScrollController: _scrollController,
|
itemScrollController: _scrollController,
|
||||||
reverse: widget.reverse,
|
reverse: widget.reverse,
|
||||||
|
shrinkWrap: widget.shrinkWrap,
|
||||||
itemCount: itemCount,
|
itemCount: itemCount,
|
||||||
findChildIndexCallback: (Key key) {
|
findChildIndexCallback: (Key key) {
|
||||||
final indexedKey = key as IndexedKey;
|
final indexedKey = key as IndexedKey;
|
||||||
|
|||||||
Reference in New Issue
Block a user