Skip to content

Commit 136a6fe

Browse files
author
ws
committed
fix issue described in PR jpnurmi#87
1 parent aad50ef commit 136a6fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/src/base_spin_box.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ mixin SpinBoxMixin<T extends BaseSpinBox> on State<T> {
164164
if (hasFocus) {
165165
_selectAll();
166166
} else {
167-
final value = fixupValue(_controller.text);
168-
widget.onSubmitted?.call(value);
167+
final oldValue = _value;
168+
final newValue = fixupValue(_controller.text);
169+
if (newValue != oldValue && _focusNode.canRequestFocus) widget.onSubmitted?.call(newValue);
169170
}
170171
});
171172
}

0 commit comments

Comments
 (0)