safe method

int safe()

Returns the integer value or 0 if null.

Useful for avoiding null checks in arithmetic operations.

Implementation

int safe() => this ?? 0;