configInt function

int? configInt(
  1. Map<String, Object?> json,
  2. String key
)

Reads an int value from json at key. Returns null if missing or wrong type.

Implementation

int? configInt(Map<String, Object?> json, String key) {
  final value = json[key];
  return value is int ? value : null;
}