updateColor method

Future<Result<UpdatesBase>> updateColor({
  1. required bool forProfile,
  2. required InputChannelBase channel,
  3. int? color,
  4. int? backgroundEmojiId,
})

Update Color.

ID: d8aa3671.

Implementation

Future<Result<UpdatesBase>> updateColor({
  required bool forProfile,
  required InputChannelBase channel,
  int? color,
  int? backgroundEmojiId,
}) async {
  // Preparing the request.
  final request = ChannelsUpdateColor(
    forProfile: forProfile,
    channel: channel,
    color: color,
    backgroundEmojiId: backgroundEmojiId,
  );

  // Invoke and wait for response.
  final response = await _c.invoke(request);

  // Return the result.
  return response._to<UpdatesBase>();
}