From e2c171adec78bc116c618cba611d0c835e9931b7 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 16 Sep 2026 15:56:45 -0400 Subject: [PATCH] add scrollbar to chips --- lib/src/widgets/emoji_picker.dart | 55 +++++++++++++++++-------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/lib/src/widgets/emoji_picker.dart b/lib/src/widgets/emoji_picker.dart index 513dde6..430533a 100644 --- a/lib/src/widgets/emoji_picker.dart +++ b/lib/src/widgets/emoji_picker.dart @@ -83,34 +83,39 @@ final class const EmojiPicker({ ), SizedBox( height: 48, - child: SuperListView( - scrollDirection: .horizontal, + child: Scrollbar( controller: categoryScrollController, - listController: categoryListController, - children: combined - .mapIndexed( - (index, category) => Padding( - padding: .symmetric(horizontal: 4), - child: FilterChip( - label: Text(category.name), - avatar: category.icon, - selected: selectedCategory.value == index, - showCheckmark: false, - onSelected: (_) { - selectedCategory.value = index; + child: SuperListView( + padding: .only(bottom: 12), + scrollDirection: .horizontal, + controller: categoryScrollController, + listController: categoryListController, + children: combined + .mapIndexed( + (index, category) => Padding( + padding: .symmetric(horizontal: 4), + child: FilterChip( + label: Text(category.name), + avatar: category.icon, + selected: selectedCategory.value == index, + showCheckmark: false, + onSelected: (_) { + selectedCategory.value = index; - listController.animateToItem( - index: index, - scrollController: scrollController, - curve: (_) => Curves.easeInOut, - duration: (_) => Duration(milliseconds: 300), - alignment: 0, - ); - }, + listController.animateToItem( + index: index, + scrollController: scrollController, + curve: (_) => Curves.easeInOut, + duration: (_) => + Duration(milliseconds: 300), + alignment: 0, + ); + }, + ), ), - ), - ) - .toList(), + ) + .toList(), + ), ), ), Expanded(