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

Add generic type constraint #14

Merged
merged 5 commits into from
Mar 24, 2022
Merged

Conversation

michalsrutek
Copy link
Contributor

Basically added type constraints to

final List<T> Function(String) filter;

and

class _SearchableListState<T> extends State<SearchableList<T>> {

Which makes it easier to work with, as you get a correct type in filter function and gets rid of annoying errors such as

'(Actor) => Padding' is not a subtype of type '(dynamic) => Widget'

@koukibadr
Copy link
Owner

Surely that's a good enhancement indeed,
thanks @michalsrutek for contributing I will publish it ASAP to pub.dev

@koukibadr koukibadr merged commit 6512a51 into koukibadr:main Mar 24, 2022
@michalsrutek michalsrutek deleted the add-generic-type branch April 16, 2022 10:25
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

Successfully merging this pull request may close these issues.

None yet

2 participants