extend method
Method for Basic Transformations @param top int (Default: 10) @param left int (Default: 10) @param bottom int (Default: 10) @param right int (Default: 10) @param background String (Default: "000000") @param Border Type Border type? (Default: constant) @param DPR double (Default: 1) @return TransformationData.
Implementation
TransformationData extend(
int? top,
int? left,
int? bottom,
int? right,
String? background,
Bordertype? borderptype,
double? dpr,
) {
// Determine if there are values to add to the dictionary
var values = <String, String>{};
if (top != null) {
values['t'] = top.toString();
}
if (left != null) {
values['l'] = left.toString();
}
if (bottom != null) {
values['b'] = bottom.toString();
}
if (right != null) {
values['r'] = right.toString();
}
if (background != null && background.isNotEmpty) {
values['bc'] = background;
}
if (borderptype != null) {
values['bt'] = borderptype.value;
}
if (dpr != null) {
values['dpr'] = dpr.toString();
}
return TransformationData(plugin: 't', name: 'extend', values: values);
}