Skip to content

[General] FocusNode not passed to FormBuilderCheckbox, FormBuilderRadioGroup #1296

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

Closed
4 of 7 tasks
vickygidvir opened this issue Sep 20, 2023 · 2 comments · Fixed by #1453
Closed
4 of 7 tasks

[General] FocusNode not passed to FormBuilderCheckbox, FormBuilderRadioGroup #1296

vickygidvir opened this issue Sep 20, 2023 · 2 comments · Fixed by #1453
Labels
bug Something isn't working

Comments

@vickygidvir
Copy link

vickygidvir commented Sep 20, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

9.1.0

Platforms

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

Flutter doctor

Flutter doctor

Minimal code example

Code sample
// The focusNode parameter is present in the constructor

  FormBuilderCheckbox({
  // ...
  required this.title,
  this.focusNode, 
  // ...
: super(
          builder: (FormFieldState<bool?> field) {
            final state = field as _FormBuilderCheckboxState;
           return InputDecorator(
              decoration: state.decoration,
              child: CheckboxListTile(
              .... //observe focusNode is not passed here
              ),
            );
})

Current Behavior

I found a bug in the FormBuilderCheckbox, FormBuilderRadioGroup classes where the focusNode is not being passed correctly. When using this widget, it should accept a focusNode parameter and pass it to the underlying CheckboxListTile. However, the focusNode parameter not being passed to CheckboxListTile, GroupedRadio. Hence the respective widgets are not getting focused.

Expected Behavior

The FormBuilderCheckbox , FormBuilderRadioGroup widgets should accept and correctly pass a focusNode parameter to the CheckboxListTile, this will lead to proper working of the focus in above mentioned widgets.

Steps To Reproduce

Steps to Reproduce:

1.Create a FormBuilderCheckbox or FormBuilderRadioGroup widget.
2.Set a focusNode for the widget.
3.Observe that the focusNode is not being applied to the Checkbox or RadioButton

Aditional information

No response

@vickygidvir vickygidvir added the bug Something isn't working label Sep 20, 2023
@khirsig
Copy link

khirsig commented Sep 20, 2023

We are trying to solve similar problems.
Please join our discussion at #1297 regarding this topic.

@deandreamatias deandreamatias changed the title Bug: FocusNode not passed to FormBuilderCheckbox, FormBuilderRadioGroup [General] FocusNode not passed to FormBuilderCheckbox, FormBuilderRadioGroup Jan 27, 2024
@deandreamatias
Copy link
Collaborator

@vickygidvir please take a look if the prerelease version 10.0.0-dev.1 solve this
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants