dashed_path

Creator: coderz1093

Last updated:

0 purchases

dashed_path Image
dashed_path Images

Languages

Categories

Add to Cart

Description:

dashed path

Turns any path into a dashed path.
Preview #

Installation #
Add this to your package's pubspec.yaml file:
dependencies:
dashed_path: ^1.0.0
copied to clipboard
Import #
import 'package:dashed_path/dashed_path.dart';
copied to clipboard
Usage #
Basic usage example corresponding to the above shown preview:
CustomPaint(
painter: DashedPathPainter(
originalPath: Path()..lineTo(100, 0),
pathColor: Colors.red,
strokeWidth: 5.0,
dashGapLength: 10.0,
dashLength: 10.0,
),
size: const Size(100.0, 2.0),
),
const SizedBox(height: 50),
CustomPaint(
painter: DashedPathPainter(
originalPath: Path()
..addOval(
const Rect.fromLTWH(0, 0, 100, 100),
),
pathColor: Colors.white,
),
size: const Size(100.0, 100.0),
),
const SizedBox(height: 50),
CustomPaint(
painter: DashedPathPainter(
originalPath: Path()
..addRect(
const Rect.fromLTWH(0, 0, 100, 100),
),
pathColor: Colors.grey,
strokeWidth: 2.0,
dashLength: 25.0,
),
size: const Size(100.0, 100.0),
)
copied to clipboard
Have a look at the example folder for a complete usage example.
You can define the following properties:



Property
Description




originalPath
The original path that should be converted to a dashed path.


pathColor
The path's color.


strokeWidth
The stroke width of the path.


dashGapLength
The gap length between the dashes.


dashLength
The length of each dash.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.