getActivitiesResponseModel!.activities!
.where((element) => element.status == "Pending")
.first
when there is not found any item related to above faltering than throw bad state exception. I have searched but orElse: () => null callback is not defined for where function and i need only single object.so what i should do to handle this Exception