diff --git a/flutter/lib/common/widgets/dialog.dart b/flutter/lib/common/widgets/dialog.dart index 5fe3bdefb..58db1047c 100644 --- a/flutter/lib/common/widgets/dialog.dart +++ b/flutter/lib/common/widgets/dialog.dart @@ -597,6 +597,7 @@ class _DialogVerificationCodeField extends State { Timer? _timer; Timer? _timerReRequestFocus; SimpleWrapper errorText = SimpleWrapper(null); + String _preText = ''; @override void initState() { @@ -607,7 +608,10 @@ class _DialogVerificationCodeField extends State { if (widget.onChanged != null) { widget.controller.addListener(() { + final text = widget.controller.text.trim(); + if (text == _preText) return; widget.onChanged!(setState, errorText); + _preText = text; }); } }