propInt method

int propInt(
  1. String key, [
  2. int fallback = 0
])

Reads an integer attribute value.

Implementation

int propInt(String key, [int fallback = 0]) {
  final value = prop(key);
  if (value.isEmpty) return fallback;
  return int.tryParse(value) ?? fallback;
}