from static method
DateTime
from(
{ - int? year,
- int? month,
- int? day,
- int? hour,
- int? minute,
- int? second,
- int? millisecond,
- int? microsecond,
- TimeOfDay? timeOfDay,
- DateTime? date,
- DateTime? time,
})
Implementation
static DateTime from({
int? year,
int? month,
int? day,
int? hour,
int? minute,
int? second,
int? millisecond,
int? microsecond,
TimeOfDay? timeOfDay,
DateTime? date,
DateTime? time,
}) {
final now = Date.now;
return DateTime(
year ?? date?.year ?? now.year,
month ?? date?.month ?? now.month,
day ?? date?.day ?? now.day,
hour ?? time?.hour ?? timeOfDay?.hour ?? now.hour,
minute ?? time?.minute ?? timeOfDay?.minute ?? now.minute,
second ?? time?.second ?? now.second,
millisecond ?? time?.millisecond ?? now.millisecond,
microsecond ?? time?.microsecond ?? now.microsecond,
);
}