copyWith method

SupabaseRemoteConfig<T, Id> copyWith({
  1. SupabaseClient? client,
  2. String? table,
  3. String? idColumn,
  4. String? updatedAtColumn,
  5. String? deletedAtColumn,
  6. String? scopeNameColumn,
  7. String? scopeKeysColumn,
  8. Id idOf(
    1. T
    )?,
  9. String idToString(
    1. Id
    )?,
  10. Id idFromString(
    1. String
    )?,
  11. Map<String, dynamic> toJson(
    1. T
    )?,
  12. T fromJson(
    1. Map<String, dynamic>
    )?,
  13. void onParsePageStats({
    1. required int skipped,
    2. required int total,
    })?,
  14. String? serverTimeRpcName,
  15. SyncScope? defaultScope,
  16. bool? injectScopeOnWrite,
  17. Map<String, dynamic> scopeColumnsBuilder(
    1. SyncScope scope
    )?,
  18. SyncScope? scopeForUpsert(
    1. T item
    )?,
  19. SyncScope? scopeForDelete(
    1. Id id
    )?,
  20. Future<List<Map<String, dynamic>>> searchRunner(
    1. SupabaseSearchRequest plan
    )?,
})

Implementation

SupabaseRemoteConfig<T, Id> copyWith({
  SupabaseClient? client,
  String? table,
  String? idColumn,
  String? updatedAtColumn,
  String? deletedAtColumn,
  String? scopeNameColumn,
  String? scopeKeysColumn,
  Id Function(T)? idOf,
  String Function(Id)? idToString,
  Id Function(String)? idFromString,
  Map<String, dynamic> Function(T)? toJson,
  T Function(Map<String, dynamic>)? fromJson,
  void Function({required int skipped, required int total})? onParsePageStats,
  String? serverTimeRpcName,
  SyncScope? defaultScope,
  bool? injectScopeOnWrite,
  Map<String, dynamic> Function(SyncScope scope)? scopeColumnsBuilder,
  SyncScope? Function(T item)? scopeForUpsert,
  SyncScope? Function(Id id)? scopeForDelete,
  Future<List<Map<String, dynamic>>> Function(SupabaseSearchRequest plan)?
  searchRunner,
}) {
  return SupabaseRemoteConfig<T, Id>(
    client: client ?? this.client,
    table: table ?? this.table,
    idColumn: idColumn ?? this.idColumn,
    updatedAtColumn: updatedAtColumn ?? this.updatedAtColumn,
    deletedAtColumn: deletedAtColumn ?? this.deletedAtColumn,
    scopeNameColumn: scopeNameColumn ?? this.scopeNameColumn,
    scopeKeysColumn: scopeKeysColumn ?? this.scopeKeysColumn,
    idOf: idOf ?? this.idOf,
    idToString: idToString ?? this.idToString,
    idFromString: idFromString ?? this.idFromString,
    toJson: toJson ?? this.toJson,
    fromJson: fromJson ?? this.fromJson,
    onParsePageStats: onParsePageStats ?? this.onParsePageStats,
    serverTimeRpcName: serverTimeRpcName ?? this.serverTimeRpcName,
    defaultScope: defaultScope ?? this.defaultScope,
    injectScopeOnWrite: injectScopeOnWrite ?? this.injectScopeOnWrite,
    scopeColumnsBuilder: scopeColumnsBuilder ?? this.scopeColumnsBuilder,
    scopeForUpsert: scopeForUpsert ?? this.scopeForUpsert,
    scopeForDelete: scopeForDelete ?? this.scopeForDelete,
    searchRunner: searchRunner ?? this.searchRunner,
  );
}