From b240d88854415d9d19f430ac3adad1f2b9429391 Mon Sep 17 00:00:00 2001 From: datang Date: Wed, 6 Apr 2022 16:59:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E9=99=86/=E5=BF=98=E8=AE=B0=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E2=80=94=E2=80=94=E5=A1=AB=E5=86=99=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E5=90=8E=E4=B8=8B=E4=B8=80=E6=AD=A5=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/sign/login/forgot_psd_page.dart | 7 ++++++- lib/pages/sign/login/other_login_page.dart | 10 +++++++++- lib/pages/sign/widget/tel_text_field.dart | 4 +++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/pages/sign/login/forgot_psd_page.dart b/lib/pages/sign/login/forgot_psd_page.dart index 69035b6b..020726d8 100644 --- a/lib/pages/sign/login/forgot_psd_page.dart +++ b/lib/pages/sign/login/forgot_psd_page.dart @@ -62,7 +62,11 @@ class _ForgotPsdPageState extends State { ], ), 144.w.heightBox, - TelTextField(controller: _telController), + TelTextField( + controller: _telController, + onChange: (content) { + setState(() {}); + }), 100.w.heightBox, LoginButtonWidget( onTap: _telController.text.isNotEmpty @@ -83,6 +87,7 @@ class _ForgotPsdPageState extends State { } else { BotToast.showText(text: base.msg); } + setState(() {}); } : null, text: '下一步'), diff --git a/lib/pages/sign/login/other_login_page.dart b/lib/pages/sign/login/other_login_page.dart index 9fdcc040..f86323a2 100644 --- a/lib/pages/sign/login/other_login_page.dart +++ b/lib/pages/sign/login/other_login_page.dart @@ -86,6 +86,9 @@ class _OtherLoginPageState extends State { 40.w.heightBox, TelTextField( controller: _tel, + onChange: (String) { + setState(() {}); + }, ), 40.w.heightBox, PsdTextField( @@ -156,7 +159,12 @@ class _OtherLoginPageState extends State { align: MainAxisAlignment.start, ), 40.w.heightBox, - TelTextField(controller: _tel), + TelTextField( + controller: _tel, + onChange: (String) { + setState(() {}); + }, + ), 100.w.heightBox, LoginButtonWidget( onTap: UserTool.appProvider.second < 60 diff --git a/lib/pages/sign/widget/tel_text_field.dart b/lib/pages/sign/widget/tel_text_field.dart index b02af4e6..650bbc1a 100644 --- a/lib/pages/sign/widget/tel_text_field.dart +++ b/lib/pages/sign/widget/tel_text_field.dart @@ -6,7 +6,8 @@ import 'package:velocity_x/velocity_x.dart'; class TelTextField extends StatefulWidget { final TextEditingController controller; - const TelTextField({Key? key, required this.controller}) : super(key: key); + final Function(String) onChange; + const TelTextField({Key? key, required this.controller, required this.onChange}) : super(key: key); @override _TelTextFieldState createState() => _TelTextFieldState(); @@ -26,6 +27,7 @@ class _TelTextFieldState extends State { inputFormatters: [FilteringTextInputFormatter.digitsOnly], keyboardType: TextInputType.number, controller: widget.controller, + onChanged: widget.onChange, decoration: InputDecoration( isDense: true, border: InputBorder.none,