bloc icon indicating copy to clipboard operation
bloc copied to clipboard

chore: Bloc does not force us to add generic parameters.

Open vasilich6107 opened this issue 3 years ago • 0 comments

Description

Hi. Previously there was a need to add generic parmas when specifying BlocBuilder<CubitType, StateType>. But now analyzer is not highlighting the error. I suppose it is caused by having B extends StateStreamable<S> on generic type? In this case if we use

BlocBuilder(
   builder: (_, state) {}
);

we'll get an error Error: Could not find the correct Provider<StateStreamable<Object?>>

Do we have any option to return back to basics with forcing generics specification?

vasilich6107 avatar Jul 12 '22 16:07 vasilich6107