The following assertion was thrown building _BodyBuilder: BlocProvider.of() called with a context that does not contain a Bloc of type CalculationBloc. site:stackoverflow.com code example
Example: javascript check if is array
var colors=["red","green","blue"];
if(Array.isArray(colors)){
//colors is an array
}