processYear static method

int? processYear(
  1. String? year
)

Implementation

static int? processYear(String? year) {
  return year != null && RegExp(r"^\d{4}$").hasMatch(year)
      ? int.parse(year)
      : null;
}