getStateById method
Implementation
CubitStateEntity getStateById({required ID cubitID, required ID stateID}) {
final cubit = state.getCubitByID(cubitID);
final cubitState = cubit.states[stateID];
if (cubitState == null) {
Logger.printError('State not found in cubit');
throw Exception('State not found in AppCubit');
}
return cubitState;
}