decodeInt function

int decodeInt(
  1. Object? v,
  2. String f
)

Decodes a JSON integer, or throws E_PARAMS. Used by generated code.

Implementation

int decodeInt(Object? v, String f) =>
    v is int ? v : throw BridgeError(BridgeErrorCode.params, '$f: expected an int');