toIntOrNull method

int? toIntOrNull()

Parses the string as an int or returns null if it is not a number.

Implementation

int? toIntOrNull() => this == null ? null : int.tryParse(this!);