Skip to content

Add support for dashed and dotted lines in Timeline#48

Open
Youcef-Goudjal wants to merge 1 commit intoJHBitencourt:masterfrom
Youcef-Goudjal:master
Open

Add support for dashed and dotted lines in Timeline#48
Youcef-Goudjal wants to merge 1 commit intoJHBitencourt:masterfrom
Youcef-Goudjal:master

Conversation

@Youcef-Goudjal
Copy link

Summary

This PR adds support for dashed and dotted lines in the TimelineDivider component. It introduces new properties to enable dashed and dotted line styles and implements a CustomPainter to handle the custom drawing.

Enhanced Line Styling:

Added support for dotted and dashed lines in both tile.dart and timeline_divider.dart. This includes new parameters for controlling the appearance of dotted and dashed lines, such as dotRadius, dotSpacing, dashLength, and dashSpacing. These changes allow for more customizable timeline appearances.

Usage

To use a dotted or dashed line, set the corresponding properties:

TimelineDivider(
  axis: TimelineAxis.horizontal,
  thickness: 2,
  begin: 0.0,
  end: 1.0,
  color: Colors.grey,
  isDotted: true,
  dotSpacing: 4.0,
  dotRadius: 2.0,
  isDashed: false,
  dashLength: 4.0,
  dashSpacing: 4.0,
)

@2001arman
Copy link

@Youcef-Goudjal Thanks bro. Your enhancement is helpfull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants