getInt method

int? getInt(
  1. String key
)

Get map value by key as int.

Implementation

int? getInt(String key) {
  if (!this.containsKey(key)) {
    return null;
  }

  if (this[key] is! int) {
    return null;
  }

  return this[key];
}