DateTime strToDate(String day, {String pattern = "yyyy/MM/dd"}) { final fromFormatter = DateFormat(pattern); return fromFormatter.parse(day); }