convertStringToDate static method

DateTime? convertStringToDate(
  1. String? format,
  2. String? date
)

Implementation

static DateTime? convertStringToDate(String? format, String? date) {
  if (PhoenixTools.isEmpty(format) || PhoenixTools.isEmpty(date)) return null;

  return DateFormat(format).parse(date!);
}