resolve method

Map<String, String> resolve(
  1. String name
)

The properties of theme name, each layer over the previous one: the brightness (dark for the dark theme, else light), the shared part or the theme it extends, then its own. A list in a later layer replaces the whole list. Then the references ($colors.primary) are replaced by the values they name, so an extending theme that changes colors.primary changes what refers to it. Throws an ArgumentError for an unknown name, a StateError for an extends cycle or unknown parent, and a ThemePropertyException for a reference cycle or an unknown reference.

Implementation

Map<String, String> resolve(String name) {
  final resolved =
      nameOf(name) ??
      (throw ArgumentError.value(
        name,
        'name',
        'no such theme; one of ${names.join(', ')}',
      ));
  return ThemeReferences.resolve(
    resolved,
    _resolve(resolved, []),
    designs: designs,
  );
}