toLong static method

int toLong(
  1. dynamic value
)

Converts value into long or returns 0 when conversion is not possible.

  • value the value to convert. Returns long value or 0 when conversion is not supported.

See toLongWithDefault

Implementation

static int toLong(value) {
  return LongConverter.toLongWithDefault(value, 0);
}