ReferencedModel.fromJson constructor

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

Constructs a new instance of ReferencedModel, from json, which must be a valid JSON object. Throws if the conversion fails.

Implementation

factory ReferencedModel.fromJson(
  Map<String, dynamic>? json,
) {
  try {
    return fromJsonOrNull(json)!;
  } catch (e) {
    assert(false, '$ReferencedModel.fromJson: $e');
    rethrow;
  }
}