byString method

String? byString(
  1. String key, {
  2. String? defaultValue,
})

Implementation

String? byString(String key, {String? defaultValue}) {
  if (this[key] == null) return defaultValue;
  return this[key]?.toString() ?? defaultValue;
}