File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
lib/features/searching/view_model Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,16 @@ class SearchingNotifier extends StateNotifier<GridNotifierState> {
169169 if (_isBuildingGrid) return ;
170170 _isBuildingGrid = true ;
171171
172- final index = _getIndex (addState: state, localPosition: event.localPosition);
172+ int index = _getIndex (addState: state, localPosition: event.localPosition);
173+
174+ /// when you try to draw on the right border if you make the arrow closly to the border it will draw the wall in the left side (the next index)
175+ /// those two lines to prevent that
176+ final calcIndex = (event.localPosition.dx / _gridSquareSize).floor ();
177+ if (calcIndex != 0 &&
178+ calcIndex % state.columnCrossAxisCount == 0 &&
179+ index % state.columnCrossAxisCount == 0 ) {
180+ index-- ;
181+ }
173182
174183 /// to handle multi calls from listener widget
175184 if (index == state.currentTappedIndex) {
You can’t perform that action at this time.
0 commit comments