fromJson method

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

Implementation

@override
USkeletonFeedPostReason fromJson(Map<String, dynamic> json) {
  try {
    if (isSkeletonReasonRepost(json)) {
      return USkeletonFeedPostReason.skeletonReasonRepost(
        data: const SkeletonReasonRepostConverter().fromJson(json),
      );
    }

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