Date.fromJson constructor

Date.fromJson(
  1. Object? j
)

Implementation

factory Date.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Date(
    year: switch (json['year']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    month: switch (json['month']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    day: switch (json['day']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
  );
}