readString method

String readString(
  1. dynamic source,
  2. dynamic key, {
  3. String defaultValue = '',
})

Reads a string value from the source, and if not found, returns the provided defaultValue.

Implementation

String readString(source, key, {String defaultValue = ''}) {
  return tryReadString(source, key) ?? defaultValue;
}