formatDate static method
Implementation
static String formatDate(DateTime? t, {isTime = false}) {
t = t?.toLocal();
return t == null
? ""
: "${t.year}年${t.month}月${t.day}日 ${isTime ? "${t.hour.toString().padLeft(2, "0")}:${t.minute.toString().padLeft(2, "0")}:${t.day.toString().padLeft(2, "0")}" : ""}";
}