toIntOrZero property

int get toIntOrZero

Parses to int, returns 0 on failure.

Implementation

int get toIntOrZero => int.tryParse(this) ?? 0;