Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dashed and dotted lines in Timeline #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

3 participants