Date class Null safety

Represents a whole calendar date.

Set day to 0 when only the month and year are significant, for example, all of December 2018. Set day and month to 0 if only the year is significant, for example, the entire of 2018. Set year to 0 when only the day and month are significant, for example, an anniversary or birthday. Unsupported: Setting all values to 0, only month to 0, or both day and year to 0 at the same time.

Constructors

Date({int? day, int? month, int? year})
Date.fromJson(Map json_)

Properties

day int?
Day of month.
read / write
hashCode int
The hash code for this object.
read-onlyinherited
month int?
Month of a year.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
year int?
Year of the date.
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited