refactor: suggested changes

This commit is contained in:
squidrye 2023-03-21 17:38:22 +05:30
parent 5c099297a4
commit 10b6b9e5ad

View File

@ -343,11 +343,7 @@ class _SelectionMenuWidgetState extends State<SelectionMenuWidget> {
newSelectedIndex += widget.maxItemInRow;
var currRow = (newSelectedIndex) % widget.maxItemInRow;
if (newSelectedIndex >= _showingItems.length) {
if (currRow + 1 >= widget.maxItemInRow) {
newSelectedIndex = 0;
} else {
newSelectedIndex = (currRow + 1);
}
newSelectedIndex = (currRow + 1) % widget.maxItemInRow;
}
}