readInt function

int readInt(
  1. Map<String, PropertyValue> props,
  2. String key,
  3. int fallback
)

Reads an int property, or returns fallback.

Implementation

int readInt(Map<String, PropertyValue> props, String key, int fallback) {
  final v = props[key];
  return v is IntValue ? v.value : fallback;
}