DateTime constructor

DateTime({
  1. int? year,
  2. int? month,
  3. int? day,
  4. int? hours,
  5. int? minutes,
  6. int? seconds,
  7. int? nanos,
  8. Duration? utcOffset,
  9. TimeZone? timeZone,
})

Implementation

factory DateTime({
  $core.int? year,
  $core.int? month,
  $core.int? day,
  $core.int? hours,
  $core.int? minutes,
  $core.int? seconds,
  $core.int? nanos,
  $10.Duration? utcOffset,
  TimeZone? timeZone,
}) {
  final $result = create();
  if (year != null) {
    $result.year = year;
  }
  if (month != null) {
    $result.month = month;
  }
  if (day != null) {
    $result.day = day;
  }
  if (hours != null) {
    $result.hours = hours;
  }
  if (minutes != null) {
    $result.minutes = minutes;
  }
  if (seconds != null) {
    $result.seconds = seconds;
  }
  if (nanos != null) {
    $result.nanos = nanos;
  }
  if (utcOffset != null) {
    $result.utcOffset = utcOffset;
  }
  if (timeZone != null) {
    $result.timeZone = timeZone;
  }
  return $result;
}