toString function

String toString(
  1. dynamic value, {
  2. String fallback = '',
})

Convert any dynamic value to String or fallback safely.

Implementation

String toString(value, {String fallback = ''}) {
  return toStringOrNull(value) ?? fallback;
}