fromJson static method

TestVectorInt? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static TestVectorInt? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return TestVectorInt(
    value: List<int>.from(((json['value'] as List<dynamic>?) ?? <dynamic>[])
        .map((item) =>
            (item is int ? item : int.tryParse(item.toString()) ?? 0))
        .toList()),
  );
}