copyWith method

PaginatedRequestParams copyWith({
  1. RequestMetaObject? meta,
  2. String? cursor,
})

A copy with the given properties replaced; everything else, unknown keys included, is kept.

Implementation

PaginatedRequestParams copyWith({
  RequestMetaObject? meta,
  String? cursor,
}) =>
    PaginatedRequestParams.fromJson({
      ...toJson(),
      if (meta != null) '_meta': $encode(meta),
      if (cursor != null) 'cursor': $encode(cursor),
    });