getByUsername method Null safety

Future<Channel> getByUsername(
  1. dynamic username

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


Future<Channel> getByUsername(dynamic username) async {
  username = Username.fromString(username);

  var channelPage =
      await ChannelPage.getByUsername(_httpClient, username.value);
  return Channel(ChannelId(channelPage.channelId), channelPage.channelTitle,
      channelPage.channelLogoUrl, channelPage.subscribersCount);