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

Optional group and subtitle #55

Closed
mauriziopinotti opened this issue Jun 27, 2023 · 0 comments
Closed

Optional group and subtitle #55

mauriziopinotti opened this issue Jun 27, 2023 · 0 comments

Comments

@mauriziopinotti
Copy link

mauriziopinotti commented Jun 27, 2023

I am using

          _items = S2Choice.listFrom<T, T>(
            source: items!,
            value: (index, item) => item,
            title: (index, item) => item.title!,
            subtitle: (index, item) => item.subtitle,
            group: (index, item) => item.group,
            meta: (index, item) => item,
          );

where item.subtitle and item.group are String?.

This fails with The return type 'String?' isn't a 'String', as required by the closure's context.

Basically, subtitle and group can either be provided or not provided, but if provided it must not be null; I need to provide it as null.

I fixed this locally and will submit a PR.

mauriziopinotti added a commit to easyhour/flutter_awesome_select that referenced this issue Jun 27, 2023
mauriziopinotti added a commit to easyhour/flutter_awesome_select that referenced this issue Oct 12, 2024
mauriziopinotti added a commit to easyhour/flutter_awesome_select that referenced this issue Oct 12, 2024
mauriziopinotti added a commit to easyhour/flutter_awesome_select that referenced this issue Oct 12, 2024
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

No branches or pull requests

1 participant