tryParseIntFromMap function Null safety

int? tryParseIntFromMap(
  1. Map<dynamic, String> map,
  2. String key
)

Parses key from map as a, possibly signed, integer literal and return its value.

Implementation

int? tryParseIntFromMap(Map<dynamic, String> map, String key) =>
    map.containsKey(key) ? int.tryParse(map[key]!) : null;