toInt method

int? toInt()

将字符串转换为int

Implementation

int? toInt() {
  return int.tryParse(this);
}