futureDate method

DateTime futureDate([
  1. int days = 5 * 365
])

default 365*5 = 1825 days (5 year) random date from Today

Implementation

DateTime futureDate([int days = 5 * 365]) {
  final int randomDays = nextInt(days);
  final DateTime randomDate = DateTime.now()
      .add(Duration(days: randomDays, seconds: nextInt(60 * 60 * 24)));
  return randomDate;
}