idFromJson function

int idFromJson(
  1. dynamic value
)

Implementation

int idFromJson(value) {
  if (value is String) {
    return int.tryParse(value) ?? 0;
  }
  return value;
}