updateRowFromJson method

Future<String?> updateRowFromJson(
  1. Map<String, Object?> originalRow,
  2. Map<String, Object?> updatedRow
)

Implementation

Future<String?> updateRowFromJson(
  Map<String, Object?> originalRow,
  Map<String, Object?> updatedRow,
) async {
  final sourceId = source.selectedSourceId;
  final collection = source.selectedCollection;
  if (sourceId == null || collection == null || !canEditCells) {
    return 'Editing is not available in this view.';
  }

  final error = await edit.updateRowFromJson(
    sourceId: sourceId,
    collection: collection,
    originalRow: originalRow,
    updatedRow: updatedRow,
  );
  if (error == null) await table.refresh();
  return error;
}