edit_account_form visual improvements

This changes the icon for the "Waiting for network" button to an hourglass instead of a checkmark, and adds more vertical spacing between the field so that the labels and validation messages don't collide.
This commit is contained in:
Brandon Vandegrift 2025-04-03 14:52:09 -04:00
parent f4407e5284
commit a3aa7569ab

View File

@ -192,6 +192,8 @@ class _EditProfileFormState extends State<EditProfileForm> {
onChanged: _onChanged,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
spacing: 8,
children: [
Row(children: [
const Spacer(),
@ -289,7 +291,7 @@ class _EditProfileFormState extends State<EditProfileForm> {
_currentValueAutoAway = v ?? false;
});
},
),
).paddingLTRB(0, 0, 0, 16),
FormBuilderTextField(
name: EditProfileForm.formFieldAutoAwayTimeout,
enabled: _currentValueAutoAway,
@ -319,7 +321,9 @@ class _EditProfileFormState extends State<EditProfileForm> {
return ElevatedButton(
onPressed: (networkReady && _isModified) ? _doSubmit : null,
child: Row(mainAxisSize: MainAxisSize.min, children: [
const Icon(Icons.check, size: 16).paddingLTRB(0, 0, 4, 0),
Icon(networkReady ? Icons.check : Icons.hourglass_empty,
size: 16)
.paddingLTRB(0, 0, 4, 0),
Text(networkReady
? widget.submitText
: widget.submitDisabledText)