toDateTime method

DateTime toDateTime(
  1. {bool isUtc = false}
)

Returns DateTime(year, month, day).

Implementation

DateTime toDateTime({bool isUtc = false}) {
  if (isUtc) {
    return DateTime.utc(year, month, day);
  }
  return DateTime(year, month, day);
}