padding method
- String padding
This function lets you add extra pixels to the edges of an image. This is useful if you want to add whitespace or border to an image. The value for this parameter can be given in pixels or percentage.
You can specify values for top, right, bottom, and left padding for an image. For example, to add padding to the top edge by 25px, right edge by 50px, bottom edge by 75px and left edge by 100,
For more details, Read documentation: https://www.contentstack.com/docs/developers/apis/image-delivery-api/#pad
Example:
final stack = contentstack.Stack(apiKey, deliveryToken, environment);
final imageTransformation = stack.imageTransform(imageUrl);
final response = await imageTransformation.
padding("25,50,75,100").fetch();
Implementation
void padding(String padding) {
query.append('pad', padding);
}