Skip to content

Commit

Permalink
fix: wrong initial sticky header (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimibe authored Nov 15, 2023
1 parent 5fec2f4 commit eb46e62
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/grouped_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,9 @@ class _GroupedListViewState<T, E> extends State<GroupedListView<T, E>> {
var hiddenIndex = widget.reverse ? _sortedElements.length * 2 - 1 : 0;
var isSeparator = widget.reverse ? (int i) => i.isOdd : (int i) => i.isEven;

if (widget.reverse) {
_ambiguate(WidgetsBinding.instance)!.addPostFrameCallback((_) {
_scrollListener();
});
}
_ambiguate(WidgetsBinding.instance)!.addPostFrameCallback((_) {
_scrollListener();
});

/// The itemBuilder function for this package divides the [index] by two
/// because between each element a separator is displayed. Depending on the
Expand Down

0 comments on commit eb46e62

Please sign in to comment.