HostedDetails.fromJson constructor

HostedDetails.fromJson(
  1. Object data
)

Implementation

factory HostedDetails.fromJson(Object data) {
  if (data is String) {
    data = {'url': data};
  }

  if (data is Map) {
    return _$HostedDetailsFromJson(data);
  }

  throw ArgumentError.value(data, 'hosted', 'Must be a Map or String.');
}