diff --git a/packages/dropdown_button2/lib/src/seperated_sliver_child_builder_delegate.dart b/packages/dropdown_button2/lib/src/seperated_sliver_child_builder_delegate.dart index 9fe8c2e..ae57ab6 100644 --- a/packages/dropdown_button2/lib/src/seperated_sliver_child_builder_delegate.dart +++ b/packages/dropdown_button2/lib/src/seperated_sliver_child_builder_delegate.dart @@ -65,7 +65,8 @@ class SeparatedSliverChildBuilderDelegate extends SliverChildBuilderDelegate { }, ); - // Helper method to compute the actual child count. + /// Computes the actual child count from the given item count, taking into account separators. + /// It returns the actual child count, excluding separators. static int computeActualChildCount(int itemCount) { return math.max(0, itemCount * 2 - 1); }