toLongWithDefault static method
Converts value into integer or returns default when conversion is not possible.
value
the value to convert.- defaultValue the default value. Returns long value or default when conversion is not supported
See toNullableLong
Implementation
static int toLongWithDefault(value, int defaultValue) {
var result = LongConverter.toNullableLong(value);
return result ?? defaultValue;
}