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

enhancements in android keyboard interaction #376

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/features/document_edit/view/document_edit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ class _DocumentEditPageState extends State<DocumentEditPage>
name: fkContent,
maxLines: null,
keyboardType: TextInputType.multiline,
enableSuggestions: true,
initialValue: state.document.content,
decoration: const InputDecoration(
border: InputBorder.none,
Expand Down Expand Up @@ -403,6 +404,7 @@ class _DocumentEditPageState extends State<DocumentEditPage>
Widget _buildTitleFormField(String? initialTitle) {
return FormBuilderTextField(
name: fkTitle,
enableSuggestions: true,
decoration: InputDecoration(
label: Text(S.of(context)!.title),
suffixIcon: IconButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class _DocumentUploadPreparationPageState
// Title
FormBuilderTextField(
autovalidateMode: AutovalidateMode.always,
enableSuggestions: true,
name: DocumentModel.titleKey,
initialValue: widget.title ??
"scan_${fileNameDateFormat.format(_now)}",
Expand Down Expand Up @@ -179,6 +180,7 @@ class _DocumentUploadPreparationPageState
// Filename
FormBuilderTextField(
autovalidateMode: AutovalidateMode.always,
enableSuggestions: true,
readOnly: _syncTitleAndFilename,
enabled: !_syncTitleAndFilename,
name: fkFileName,
Expand Down
2 changes: 2 additions & 0 deletions lib/features/edit_label/view/label_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class _LabelFormState<T extends Label> extends State<LabelForm<T>> {
children: [
FormBuilderTextField(
autofocus: widget.autofocusNameField,
enableSuggestions: true,
name: Label.nameKey,
decoration: InputDecoration(
labelText: S.of(context)!.name,
Expand Down Expand Up @@ -130,6 +131,7 @@ class _LabelFormState<T extends Label> extends State<LabelForm<T>> {
if (_enableMatchFormField)
FormBuilderTextField(
name: Label.matchKey,
enableSuggestions: true,
decoration: InputDecoration(
labelText: S.of(context)!.match,
errorText: _errors[Label.matchKey],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class _UserCredentialsFormFieldState extends State<UserCredentialsFormField>
@override
Widget build(BuildContext context) {
super.build(context);
return FormBuilderField<LoginFormCredentials?>(
return AutofillGroup(child: FormBuilderField<LoginFormCredentials?>(
initialValue: LoginFormCredentials(
password: widget.initialPassword,
username: widget.initialUsername,
Expand Down Expand Up @@ -100,47 +100,9 @@ class _UserCredentialsFormFieldState extends State<UserCredentialsFormField>
),
].map((child) => child.padded()).toList(),
),
);
));
}

@override
bool get wantKeepAlive => true;
}

/**
* AutofillGroup(
child: Column(
children: [
FormBuilderTextField(
name: fkUsername,
focusNode: _focusNodes[fkUsername],
onSubmitted: (_) {
FocusScope.of(context).requestFocus(_focusNodes[fkPassword]);
},
validator: FormBuilderValidators.required(
errorText: S.of(context)!.usernameMustNotBeEmpty,
),
autofillHints: const [AutofillHints.username],
decoration: InputDecoration(
labelText: S.of(context)!.username,
),
).padded(),
FormBuilderTextField(
name: fkPassword,
focusNode: _focusNodes[fkPassword],
onSubmitted: (_) {
FocusScope.of(context).unfocus();
},
autofillHints: const [AutofillHints.password],
validator: FormBuilderValidators.required(
errorText: S.of(context)!.passwordMustNotBeEmpty,
),
obscureText: true,
decoration: InputDecoration(
labelText: S.of(context)!.password,
),
).padded(),
],
),
);
*/
1 change: 1 addition & 0 deletions lib/features/saved_view/view/add_saved_view_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class _AddSavedViewPageState extends State<AddSavedViewPage> {
children: [
FormBuilderTextField(
name: _fkName,
enableSuggestions: true,
validator: (value) {
if (value?.trim().isEmpty ?? true) {
return S.of(context)!.thisFieldIsRequired;
Expand Down
1 change: 1 addition & 0 deletions lib/features/saved_view/view/edit_saved_view_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class _EditSavedViewPageState extends State<EditSavedViewPage> {
children: [
FormBuilderTextField(
initialValue: widget.savedView.name,
enableSuggestions: true,
name: _fkName,
validator: (value) {
if (value?.trim().isEmpty ?? true) {
Expand Down