static TimelineItem fromGraphQL()

in lib/github_datatypes.dart [312:332]


  static TimelineItem fromGraphQL(dynamic node) {
    String? title = null;
    int? number = null;
    Actor? actor = null;

    if (node['__typename'] == 'MilestonedEvent' ||
        node['__typename'] == 'DemilestonedEvent') {
      title = node['milestoneTitle'];
      actor = Actor.fromGraphQL(node['actor']);
    } else if (node['__typename'] == 'CrossReferencedEvent') {
      title = node['source']['title'];
      number = node['source']['number'];
    } else if (node['__typename'] == 'AssignedEvent' ||
        node['__typename'] == 'UnassignedEvent') {
      actor =
          node['assignee'] != null ? Actor.fromGraphQL(node['assignee']) : null;
    }

    return TimelineItem(node['__typename'], title, number, actor,
        node['createdAt'] == null ? null : DateTime.parse(node['createdAt']));
  }