prevYear method

String prevYear(
  1. dynamic currentYear
)

Implementation

String prevYear(currentYear) {
  // Get the Previous Year
  int curYr;
  if(currentYear is String){
    curYr = int.parse(currentYear);
  }else{
    curYr = currentYear;
  }
  int finalYr = curYr - 1;
  return finalYr.toString();
}