update method

Future<UpdateChannelResponse> update (
  1. Map<String, dynamic> channelData,
  2. Message updateMessage
)

Edit the channel custom data

Implementation

Future<UpdateChannelResponse> update(
  Map<String, dynamic> channelData,
  Message updateMessage,
) async {
  final response = await _client.post(_channelURL, data: {
    'message': updateMessage.copyWith(updatedAt: DateTime.now()).toJson(),
    'data': channelData,
  });
  return _client.decode(response.data, UpdateChannelResponse.fromJson);
}