dateFormat method

String? dateFormat(
  1. String pattern
)

格式化时间字符串

Implementation

String? dateFormat(String pattern) {
  if (this == null) {
    return null;
  }
  var date = DateTime.parse(this!);
  return date.dateFormat(pattern);
}