fromJson method

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

Implementation

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

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