fromJson static method

Pointer? fromJson(
  1. dynamic value
)

Returns a new Pointer instance and imports its values from value if it's a Map, null otherwise.

Implementation

// ignore: prefer_constructors_over_static_methods
static Pointer? fromJson(dynamic value) {
  if (value is Map) {
    final json = value.cast<String, dynamic>();
    return Pointer(
      dollarRef: mapValueOfType<String>(json, r'$ref'),
    );
  }
  return null;
}