Content<T>.fromJson constructor

Content<T>.fromJson(
  1. dynamic json
)

Implementation

factory Content.fromJson(dynamic json) {
  final transformed = <String, dynamic>{};
  if (json is Map) {
    transformed['content'] = json;
  } else if (json is String) {
    transformed['contentId'] = json;
  }
  return _$ContentFromJson(transformed);
}