maybeParseInt static method

int? maybeParseInt(
  1. dynamic value
)

Parses the dynamic value into a int. The value may be a String, int, double. If the value cannot be successfully parsed into an int then [the defaultValue will be returned.

Implementation

static int? maybeParseInt(dynamic value) => maybeParseDouble(value)?.toInt();