string method

String string(
  1. String format, {
  2. String? defaultValue,
})

Implementation

String string(String format, {String? defaultValue}) {
  if (this == null) return defaultValue ?? '';
  try {
    return DateFormat(format).format(this!);
  } catch (e, stackTrace) {
    UtilsSentry.reportError(e, stackTrace);
    return defaultValue ?? '';
  }
}