The Function filter it's the type bool and receive the param state it`s the type TState
TState
final bool Function(TState state)? filter;