Skip to content

Commit

Permalink
fix issue described in PR jpnurmi#87
Browse files Browse the repository at this point in the history
  • Loading branch information
ws committed Aug 23, 2023
1 parent aad50ef commit 136a6fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/base_spin_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ mixin SpinBoxMixin<T extends BaseSpinBox> on State<T> {
if (hasFocus) {
_selectAll();
} else {
final value = fixupValue(_controller.text);
widget.onSubmitted?.call(value);
final oldValue = _value;
final newValue = fixupValue(_controller.text);
if (newValue != oldValue && _focusNode.canRequestFocus) widget.onSubmitted?.call(newValue);
}
});
}
Expand Down

0 comments on commit 136a6fe

Please sign in to comment.