setObject method
Sets components specified by a map.
Unlike addObject, this sets absolute values rather than adding.
Implementation
Hora setObject(Map<String, dynamic> map) => copyWith(
year: _getInt(map, [DateTimeKeys.year, DateTimeKeys.years]),
month: _getInt(map, [DateTimeKeys.month, DateTimeKeys.months]),
day: _getInt(
map,
[DateTimeKeys.day, DateTimeKeys.days, DateTimeKeys.date],
),
hour: _getInt(map, [DateTimeKeys.hour, DateTimeKeys.hours]),
minute: _getInt(map, [DateTimeKeys.minute, DateTimeKeys.minutes]),
second: _getInt(map, [DateTimeKeys.second, DateTimeKeys.seconds]),
millisecond:
_getInt(map, [DateTimeKeys.millisecond, DateTimeKeys.milliseconds]),
microsecond:
_getInt(map, [DateTimeKeys.microsecond, DateTimeKeys.microseconds]),
);