diff --git a/lib/src/drag_sort_view.dart b/lib/src/drag_sort_view.dart index 0047998..aae4250 100644 --- a/lib/src/drag_sort_view.dart +++ b/lib/src/drag_sort_view.dart @@ -412,7 +412,7 @@ class DragSortViewState extends State _init(context, padding, margin); } - int column = (_itemCount > 3 ? 3 : _itemCount + 1); + int column = (_itemCount >= 3 ? 3 : _itemCount + 1); int row = ((_itemCount + (_itemCount < 9 ? 1 : 0)) / 3).ceil(); double realWidth = _itemWidth * column + widget.space * (column - 1) + padding.horizontal;