From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 908501FF0C1 for ; Wed, 26 Aug 2026 11:32:29 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id B4EC9214C0; Wed, 26 Aug 2026 11:32:28 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 26 Aug 2026 11:32:21 +0200 Message-Id: Subject: Re: [PATCH login-manager v3 3/5] refactor: ui: split password form into its own widget From: "Shan Shaji" To: "Azharul Haque" , X-Mailer: aerc 0.20.0 References: <20260810144713.75806-1-haque@azharul.com> <20260821034147.30194-1-haque@azharul.com> <20260821034147.30194-6-haque@azharul.com> In-Reply-To: <20260821034147.30194-6-haque@azharul.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787736710084 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.545 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 3K6SZABW3HHALHYHDY2Z3PPVMLCMU2TK X-Message-ID-Hash: 3K6SZABW3HHALHYHDY2Z3PPVMLCMU2TK X-MailFrom: s.shaji@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Aug 21, 2026 at 5:41 AM CEST, Azharul Haque wrote: [snip] > + > +/// Username/password credential fields of the login form, including the > +/// optional "save password" checkbox. > +class _ProxmoxPasswordForm extends StatefulWidget { > + final TextEditingController usernameController; > + final TextEditingController passwordController; > + final Function? onPasswordSubmitted; > + final Function? onSavePasswordChanged; > + final bool? canSavePassword; > + final bool? passwordSaved; > + > + const _ProxmoxPasswordForm({ > + required this.usernameController, > + required this.passwordController, > + this.onPasswordSubmitted, > + this.onSavePasswordChanged, > + this.canSavePassword, > + this.passwordSaved, > + }); > + > + @override > + State<_ProxmoxPasswordForm> createState() =3D> _ProxmoxPasswordFormSta= te(); > +} > + > +class _ProxmoxPasswordFormState extends State<_ProxmoxPasswordForm> { > + bool _obscure =3D true; > + bool? _savePwCheckbox; > + FocusNode? passwordFocusNode; nit: I believe the FocusNode is implicitly initialized to null. It's not instantiated and null is assigned to the TextFormField. You don't need to do anything as it's same in master as well. I just want to note it here. Will fix it in another patch. > + @override > + Widget build(BuildContext context) { > + return Column( > + mainAxisSize: MainAxisSize.min, > + children: [ > + TextFormField( > + decoration: const InputDecoration( > + icon: Icon(Icons.person), > + labelText: 'Username', > + ), > + controller: widget.usernameController, > + validator: (value) { > + if (value!.isEmpty) { > + return 'Please enter username'; > + } > + return null; > + }, > + autofillHints: const [AutofillHints.username], > + ), > + Stack( > + children: [ > + TextFormField( > + decoration: const InputDecoration( > + icon: Icon(Icons.lock), > + labelText: 'Password', > + ), > + controller: widget.passwordController, > + obscureText: _obscure, > + autocorrect: false, > + focusNode: passwordFocusNode, > + validator: (value) { > + if (value!.isEmpty) { > + return 'Please enter password'; > } > - setState(() { > - _savePwCheckbox =3D value!; > - }); > + return null; > }, > + onFieldSubmitted: (value) =3D> widget.onPasswordSubmitted!= (), > + autofillHints: const [AutofillHints.password], > + ), [snip]