toFormat method

TransformationData toFormat(
  1. TFormat? format,
  2. TQuality? quality
)

Method for Basic Transformations

  • format : TFormat (Default: jpeg)
  • quality : TQuality (Default: 75) Returns TransformationData.

Implementation

TransformationData toFormat(
  TFormat? format,
  TQuality? quality,
) {
  var values = <String, String>{};
  if (format != null) {
    values['f'] = format.value;
  }
  if (quality != null) {
    values['q'] = quality.value;
  }
  return TransformationData(plugin: 't', name: 'toFormat', values: values);
}