leaf<T> method

T? leaf<T>(
  1. String path,
  2. T? parse(
    1. String raw
    ),
  3. String expected
)

The single value at path, parsed by parse; null when it is not set. Throws a ThemePropertyException saying expected when parse gives null or the property is a map.

Implementation

T? leaf<T>(String path, T? Function(String raw) parse, String expected) =>
    _leaf(path, parse, expected);