From 89da62244a8f89b96f0d56f4fba47fe11be297ef Mon Sep 17 00:00:00 2001 From: laiiihz Date: Tue, 8 Dec 2020 11:22:17 +0800 Subject: [PATCH] update numeric widget --- lib/buttons/as_numeric_button.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/buttons/as_numeric_button.dart b/lib/buttons/as_numeric_button.dart index e20565c..306d30c 100644 --- a/lib/buttons/as_numeric_button.dart +++ b/lib/buttons/as_numeric_button.dart @@ -134,8 +134,10 @@ class _ASNumericButtonState extends State { keyboardType: TextInputType.number, controller: _controller, onChanged: (text) { + int value = int.tryParse(text); + _displayValue = value ?? widget.initValue; setState(() {}); - //TODO input check + widget.onChange(_displayValue); }, focusNode: _focusNode, style: TextStyle(