This is my function typedef:
typedef Widget ItemBuilder<T>(T item);
This is my class property:
final ItemBuilder<T>? itemBuilder;
This is how I pass this to my object:
itemBuilder: (Color color) => Container(height: 100.0, color: color)
This is the error that I get:
type '(Color) => Container' is not a subtype of type '((Color?) => Widget)?'
Can you help me figure this out?