skip to Main Content

Dart/Flutter Generics: type '(SearchFilterItemModel<DateTime>) => String' is not a subtype of type '(SearchFilterItemModel<dynamic>) => String'

I have defined models for my search filter items like below: typedef OnFilterButtonPressed<T> = String Function(SearchFilterItemModel<T> searchFilterItem); class SearchFilterItemModel<T> { final String id, name; final OnFilterButtonPressed<T> onPressed; SearchFilterItemModel({ required this.id, required this.name, required this.onPressed, }); } Then I've defined a…

VIEW QUESTION
Back To Top
Search