resolve method

UiVocabularySchema resolve(
  1. String? missionType
)

Resolve the schema for a given mission type, falling back to the base schema when no narrowing is declared.

Implementation

UiVocabularySchema resolve(String? missionType) {
  if (missionType == null) return UiVocabularySchema.base;
  final narrowed = byMissionType[missionType];
  if (narrowed == null) return UiVocabularySchema.base;
  return narrowed;
}