Skip to content

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

Closed
@vickygidvir

Description

@vickygidvir

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions