strokeStyle static method

TextStyle? strokeStyle(
  1. VideoTextOverlay overlay,
  2. double pixelScale
)

Black outline drawn underneath the fill, or null for other styles.

Implementation

static TextStyle? strokeStyle(VideoTextOverlay overlay, double pixelScale) {
  if (overlay.style != TextOverlayStyle.outline) return null;
  final paint = Paint()
    ..style = PaintingStyle.stroke
    ..strokeWidth = math.max(1.5, overlay.fontSize * pixelScale * 0.12)
    ..strokeJoin = StrokeJoin.round
    ..color = VideoEditorColors.mediaShade.withValues(alpha: 0.85);
  return _base(overlay, pixelScale, foreground: paint);
}