getNumValOr method

num? getNumValOr(
  1. dynamic key
)

Implementation

num? getNumValOr(dynamic key) {
  if (this[key] is num) return this[key];
  if (this[key] is String) return num.tryParse(this[key]);
  return null;
}