static bool isThisWeek(DateTime date){ Duration diff = DateTime.now().difference(date); final diffDays = diff.inDays < 0 ? diff.inDays*-1 : diff.inDays; return diffDays <= 7; }