padding static method

EdgeInsets padding(
  1. VideoTextOverlay overlay,
  2. double pixelScale
)

Implementation

static EdgeInsets padding(VideoTextOverlay overlay, double pixelScale) {
  if (overlay.style == TextOverlayStyle.box) {
    return EdgeInsets.symmetric(
      horizontal: 18 * pixelScale,
      vertical: 8 * pixelScale,
    );
  }
  // Room for the outline / shadow so nothing is clipped in the PNG.
  return EdgeInsets.all(math.max(2, overlay.fontSize * pixelScale * 0.15));
}