put method

  1. @override
Future<OutputType?> put(
  1. Map<String, Object> primaryKeys,
  2. Map<String, dynamic> data, {
  3. Options? options,
  4. CancelToken? cancelToken,
  5. void onReceiveProgress(
    1. int total,
    2. int finish
    )?,
  6. void onSendProgress(
    1. int total,
    2. int finish
    )?,
  7. bool caching = false,
})
override

Implementation

@override
Future<OutputType?> put(
  Map<String, Object> primaryKeys,
  Map<String, dynamic> data, {
  Options? options,
  CancelToken? cancelToken,
  void Function(int total, int finish)? onReceiveProgress,
  void Function(int total, int finish)? onSendProgress,
  bool caching = false,
}) async {
  final response = await super.put(
    primaryKeys,
    data,
    options: options,
    cancelToken: cancelToken,
    onReceiveProgress: onReceiveProgress,
    onSendProgress: onSendProgress,
  );
  if (response == null) return null;

  if (caching) dbSet.insertRow(response);
  rows.add(response);
  return response;
}