markAsDelivered method Null safety

Future<void> markAsDelivered(
  1. {required String channelUrl,
  2. String? userId,
  3. int? timestamp}
)

Implementation

Future<void> markAsDelivered({
  required String channelUrl,
  String? userId,
  int? timestamp,
}) async {
  final url = endpoint.GroupChannels.channelurl_messages_delivered
      .format([channelUrl]);
  final body = {
    'user_id': userId ?? currentUserId,
    'ts': timestamp,
  };
  await client.put(url: url, body: body);
}