fromJson method

  1. @override
UProfileLabel fromJson(
  1. Map<String, dynamic> json
)

Implementation

@override
UProfileLabel fromJson(Map<String, dynamic> json) {
  try {
    if (isSelfLabels(json)) {
      return UProfileLabel.selfLabels(
        data: const SelfLabelsConverter().fromJson(json),
      );
    }

    return UProfileLabel.unknown(data: json);
  } catch (_) {
    return UProfileLabel.unknown(data: json);
  }
}