toDateWithFormat method
Parse string to nullable DateTime but with a specific format, e.g, 'd-M-y'.
Implementation
DateTime? toDateWithFormat(String format, [String? locale]) =>
isEmptyOrNull ? null : DateFormat(format, locale).parse(this!);
Parse string to nullable DateTime but with a specific format, e.g, 'd-M-y'.
DateTime? toDateWithFormat(String format, [String? locale]) =>
isEmptyOrNull ? null : DateFormat(format, locale).parse(this!);