Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Use flutter_keyboard_visibility in all forms #919

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

AlaaElattar
Copy link
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
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
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