optNullableInt method

int? optNullableInt(
  1. String name, {
  2. bool remove = false,
})

Returns the value mapped by name if it exists, coercing it if necessary, or null if no such mapping exists. If remove is true, then the mapping will be removed from the Map.

Implementation

int? optNullableInt(String name, {bool remove = false}) {
  if (this?.containsKey(name) == false) {
    return null;
  }
  int value = optInt(name);
  if (remove) {
    this?.remove(name);
  }
  return value;
}