modulate method

TransformationData modulate(
  1. double? brightness,
  2. double? saturation,
  3. int? hue
)

Method for Basic Transformations @param brightness double (Default: 1) @param saturation double (Default: 1) @param hue int (Default: 90) @return TransformationData.

Implementation

TransformationData modulate(
  double? brightness,
  double? saturation,
  int? hue,
) {
  // Determine if there are values to add to the dictionary

  var values = <String, String>{};

  if (brightness != null) {
    values['b'] = brightness.toString();
  }

  if (saturation != null) {
    values['s'] = saturation.toString();
  }

  if (hue != null) {
    values['h'] = hue.toString();
  }

  return TransformationData(plugin: 't', name: 'modulate', values: values);
}