toInt method

int? toInt()

Implementation

int? toInt() {
  if (isNullOrEmpty) return null;
  return int.tryParse(this!);
}