Skip to content

BooleanMetaDataField unexpected behavior #145

@EnriColombo

Description

@EnriColombo

Bug report

Describe the bug

Unexpected behavior of BooleanMetaDataField in case both 'value' and 'isRequired' parameters are set to 'true'.

To Reproduce

Inside a SupaEmailAuth widget introduce a BooleanMetaDataField, with both 'value' and 'isRequired' parameters set to 'true':

SupaEmailAuth(
  isInitiallySigningIn: false,
  // ...
  metadataFields: [
    BooleanMetaDataField(
      label: 'Sono un capitano',
      key: 'is_captain',
      checkboxPosition: ListTileControlAffinity.trailing,
      value: true,
      isRequired: true,
    ),
  ],
)

Initially submitting the form without interacting with the checkbox, the error 'This field is required' is displayed.
You need to uncheck and re-check the checkbox to submit it correctly.

Expected behavior

I'd expect no interactions by the user at all if the checkbox is already checked and it's required.

Screenshots

Image

System information

  • OS: Android 11
  • Dart SDK version: 3.8.1 (stable) (Wed May 28 00:47:25 2025 -0700) on "linux_x64"
  • Flutter 3.32.1
  • DevTools 2.45.1
  • Version of supabase_flutter: 2.9.1
  • Version of supabase_auth_ui: 0.5.5

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