heroById function

ThemeSpec? heroById(
  1. int id
)

The hero with id, or null.

Implementation

ThemeSpec? heroById(int id) {
  for (final h in heroThemes) {
    if (h.heroId == id) return h;
  }
  return null;
}