getByUsername method
Gets the metadata associated with the channel of the specified user.
username
must be either a Username or a string
which is parsed to a Username
Implementation
Future<Channel> getByUsername(dynamic username) async {
username = Username.fromString(username);
final channelPage = await ChannelPage.getByUsername(
_httpClient,
(username as Username).value,
);
return Channel(
ChannelId(channelPage.channelId),
channelPage.channelTitle,
channelPage.channelLogoUrl,
channelPage.channelBannerUrl,
channelPage.subscribersCount,
);
}