markAsRead method Null safety

Future<void> markAsRead(
  1. {List<String>? channelUrls,
  2. String? userId}
)

Implementation

Future<void> markAsRead({
  List<String>? channelUrls,
  String? userId,
}) async {
  final url = endpoint.Users.userid_readall.format([userId]);
  final body = {
    'user_id': userId,
    if (channelUrls != null && channelUrls.isEmpty)
      'channel_urls': channelUrls,
  };
  await client.put(url: url, body: body);
}