getTimeDiffInLong static method

int getTimeDiffInLong(
  1. DateTime previousDate, {
  2. DateTime? currentDate,
  3. String dateFormat = FORMAT_dd_MMM_yyyy,
})

Implementation

static int getTimeDiffInLong(DateTime previousDate, {DateTime? currentDate, String dateFormat = FORMAT_dd_MMM_yyyy}){
  DateTime targetDate = currentDate == null ? DateTime.now() : currentDate;
  return targetDate.millisecondsSinceEpoch - previousDate.millisecondsSinceEpoch;
}