toStr static method

String toStr(
  1. dynamic d,
  2. String def
)

Converts a dynamic value to a non-nullable String.

d - The dynamic value to be converted. def - The default String value if conversion fails. Returns a String.

Implementation

static String toStr(dynamic d, String def) {
  return toStrN(d) ?? def;
}