transform method

Data transform(
  1. Data data
)

Transform the data using a transformer for its data format. If no transformer is found, returns data unchanged.

Implementation

Data transform(Data data) {
  DataTransformer? transformer = transformers[data.format.toString()];
  return (transformer != null) ? transformer(data) : data;
}