Skip to content
pubscout

dash_painter

1.0.2, released 6 years ago by fluttercandies.com

Utility to paint dashed or dotted lines on a Flutter canvas.

WASM-ready
$ flutter pub add dash_painter

What it does

DashPainter turns a Path into a dashed or dotted line. It also provides DashDecoration for easy use in decorations.

AI-written summary of version 1.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Need a simple dashed line in a CustomPainter
  • Want to add dotted or dashed borders to a widget via Decoration

Skip it when

  • Require complex animation or stateful behavior
  • Need a fully featured drawing library

Strengths

  • Simple API
  • Supports points and gradients
  • Works with CustomPainter and Decoration

Weaknesses

  • Limited documentation
  • No tests
  • Only one version released

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add dash_painter: ^1.0.2 to pubspec and import 'package:dash_painter/dash_painter.dart';

const DashPainter(span: 4, step: 9).paint(canvas, path, paint);

Alternatives

Packages that do the same job and could replace dash_painter.

  • styled_divider

    Drop-in replacements for Flutter's Divider and VerticalDivider supporting multiple line styles.

  • repaint

    Canvas library extending CustomPaint with event handling and frame control