Skip to content

Use Use flutter_keyboard_visibility in all forms #919

Merged
AlaaElattar merged 2 commits intodevelopmentfrom
development_keyboard_visibility
Feb 24, 2025
Merged

Use Use flutter_keyboard_visibility in all forms #919
AlaaElattar merged 2 commits intodevelopmentfrom
development_keyboard_visibility

Conversation

@AlaaElattar
Copy link
Copy Markdown
Contributor

Changes

  • Supported flutter_keyboard_visibility for bridge, wallet and dao screens.
  • when user click out when the keyboard is open, it will close.

Related Issues

Tested Scenarios

  • Tested opening and closing keyboard by tapping anywhere the page in all mentioned screens.

Copy link
Copy Markdown
Contributor

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be applied here:

title: TextField(
focusNode: nameFocus,
autofocus: edit,
readOnly: !edit,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
controller: walletNameController,
onChanged: (text) {
_validateWalletName();
},
decoration: InputDecoration(
labelText: 'Wallet Name',
errorText: _errorText,
)),

Here too.

TextField(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
decorationColor: Theme.of(context).colorScheme.onSurface),
maxLength: 50,
decoration: InputDecoration(
label: const Text('Name'), errorText: nameError),
controller: _nameController,
),
TextField(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
decorationColor: Theme.of(context).colorScheme.onSurface),
keyboardType: TextInputType.multiline,
maxLines: null,
decoration: InputDecoration(
label: const Text('Address'),
errorText: addressError,
),
controller: _addressController,
),

TextField(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
decorationColor: Theme.of(context).colorScheme.onSurface),
maxLength: 50,
decoration: InputDecoration(
label: const Text('Name'), errorText: nameError),
controller: _nameController,
),
TextField(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
decorationColor: Theme.of(context).colorScheme.onSurface),
keyboardType: TextInputType.multiline,
maxLines: null,
decoration: InputDecoration(
label: const Text('Secret'),
errorText: secretError,
),
controller: _secretController,
),

Edit farm:

title: TextField(
focusNode: walletFocus,
autofocus: edit,
readOnly: !edit,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
controller: walletAddressController,
onChanged: (value) {
validateStellarAddress(value.trim());
},

Identity verification:

TextField(
controller: controller,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
decoration: InputDecoration(
labelText: 'Email',
errorText: validEmail == true ? null : errorEmail),
),

TextField(
controller: changeEmailController,
decoration: InputDecoration(
labelText: 'Email',
errorText: emailInputValidated
? null
: 'Please enter a valid email'),
),

Council screen:

TextField(
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
controller: urlController,
onChanged: (value) {
final v = value.trim();
if (v.isEmpty) {
errorMessage = 'URL is required';
setState(() {});
return;
}
if (!v.startsWith('wss://') && !v.startsWith('ws://')) {
errorMessage = 'Not a valid websocket URL';
setState(() {});
return;
}
if (!isFQDN(v.replaceFirst('wss://', '')) &&
!isFQDN(v.replaceFirst('ws://', ''))) {
errorMessage = 'Not a valid websocket URL';
setState(() {});
return;
}
errorMessage = null;
setState(() {});
return;
},
decoration: InputDecoration(
labelText: 'TFChain URL',
errorText: errorMessage,
)),
const SizedBox(height: 50),

@AlaaElattar AlaaElattar marked this pull request as draft February 17, 2025 12:30
@AlaaElattar AlaaElattar marked this pull request as ready for review February 18, 2025 18:59
@AlaaElattar AlaaElattar merged commit f13e4fe into development Feb 24, 2025
1 of 3 checks passed
@AlaaElattar AlaaElattar deleted the development_keyboard_visibility branch February 24, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants