queryCollect method Null safety

Future<NIMResult<NIMCollectInfoQueryResult>> queryCollect(
  1. {NIMCollectInfo? anchor,
  2. int toTime = 0,
  3. int? type,
  4. int limit = 100,
  5. QueryDirection direction = QueryDirection.QUERY_OLD}
)

Query the favorites list by page from the CommsEase server.

anchor Specify the message (added to the favorites) that ends the query. The specified one will not be included in the query result.
type Specify the type of messages (added to the favorites) that will be queried. If no value is passed in, all types of favorites will be queried.
toTime Specify the end time (unit: millisecond) for the query.
limit Specify the maximum messages that can be queried (upper limit: 100).
direction Specify the order to list the query results (reverse chronological or chronological).

Implementation

Future<NIMResult<NIMCollectInfoQueryResult>> queryCollect({
  NIMCollectInfo? anchor,
  int toTime = 0,
  int? type,
  int limit = 100,
  QueryDirection direction = QueryDirection.QUERY_OLD,
}) {
  return _platform.queryCollect(
    anchor: anchor,
    toTime: toTime,
    direction: direction,
    type: type,
    limit: limit,
  );
}