dateToString static method
Implementation
static String? dateToString(dynamic date) {
try {
if (date == null) return null;
final time = js_util.callMethod(date, 'getTime', []);
final dateTime = DateTime.fromMillisecondsSinceEpoch(time).toUtc();
final dateFormat = DateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
return dateFormat.format(dateTime);
} catch (e) {
Logging.debug("error mapping dateToString: $e");
return null;
}
}