apply method

  1. @override
Map<String, dynamic> apply(
  1. Map<String, dynamic> row
)
override

Applies this operation to row and returns the resulting row.

row is a private copy owned by the migration pipeline; implementations may mutate and return it, or return a new map.

Implementation

@override
Map<String, dynamic> apply(Map<String, dynamic> row) {
  if (!overwrite && row.containsKey(name)) return row;
  row[name] = compute != null ? compute!(row) : defaultValue;
  return row;
}