I need to store and compare dates (without times) in my app, without caring about time zones. I can see three solutions to this:
(date1.year == da
You can use compareTo:
var temp = DateTime.now().toUtc(); var d1 = DateTime.utc(temp.year,temp.month,temp.day); var d2 = DateTime.utc(2018,10,25); //you can add today's date here if(d2.compareTo(d1)==0){ print('true'); }else{ print('false'); }