isThisYear property
bool
get
isThisYear
Indicates whether the DateTime object belongs to the same year as the current date and time.
Implementation
bool get isThisYear {
return DateTime.now().year == year;
}