Channel.fromMap constructor

Channel.fromMap(
  1. Map<String, dynamic>? map
)

Implementation

factory Channel.fromMap(Map<String, dynamic>? map) {
  return Channel(
      channelId: map?['channelRenderer']['channelId'],
      thumbnail: map?['channelRenderer']['thumbnail']
      ['thumbnails'][0]['url'],
      title: map?['channelRenderer']['title']['simpleText'],
    videoCount: map?['channelRenderer']['videoCountText']
    ['runs'][0]['text']
  );
}