extend method
Method for Basic Transformations
-
top
: top (Default: 10) -
left
: left (Default: 10) -
bottom
: bottom (Default: 10) -
right
: right (Default: 10) -
background
: background (Default: "000000") -
borderptype
: Border Type (Default: constant) -
dpr
: DPR (Default: 1)
Returns 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);
}