Skip to content

Fixes: Replace hardcoded maxlines to parameter#26

Open
manandharsudhir wants to merge 4 commits into
bdlukaa:mainfrom
manandharsudhir:main
Open

Fixes: Replace hardcoded maxlines to parameter#26
manandharsudhir wants to merge 4 commits into
bdlukaa:mainfrom
manandharsudhir:main

Conversation

@manandharsudhir
Copy link
Copy Markdown

before:
image

after:
image

List which issues are fixed by this PR. You must list at least one issue.
Due to hardcoded maxline the text would always wrap on 1 line and others would be hidden hence passing maxlines through parameter.

Pre-launch Checklist

  • I have updated CHANGELOG.md with my changes
  • I have addressed all analyzer warnings as best I could
  • I have added/updated relevant documentation

Copy link
Copy Markdown
Owner

@bdlukaa bdlukaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve formatting with trailing commas.

Add documentation to the new properties.

outerRadius: outerRadius ?? kDefaultOuterRadius,
textAlign: textAlign,
maxLines: 1,
maxLines: maxLines,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
maxLines: maxLines,
maxLines: maxLines ?? 1,

Comment thread CHANGELOG.md
Comment on lines +1 to +4
## 0.5.1
* fix: Added maxlines on parameters replacing hardcoded maxline


Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 0.5.1
* fix: Added maxlines on parameters replacing hardcoded maxline
## 0.5.1
* fix: Added maxlines on parameters replacing hardcoded maxline

Comment on lines +376 to +379
final lineInfos = computeLines(text,
firstLinePadding: firstLinePadding,
innerLinePadding: innerLinePadding,
lastLinePadding: lastLinePadding);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve formatting:

Suggested change
final lineInfos = computeLines(text,
firstLinePadding: firstLinePadding,
innerLinePadding: innerLinePadding,
lastLinePadding: lastLinePadding);
final lineInfos = computeLines(text,
firstLinePadding: firstLinePadding,
innerLinePadding: innerLinePadding,
lastLinePadding: lastLinePadding,
);

Comment on lines +299 to +305
backgroundColor: backgroundColor ?? Colors.transparent,
text: painter,
innerRadius: innerRadius,
outerRadius: outerRadius,
firstLinePadding: firstLinePadding,
innerLinePadding: innerLinePadding,
lastLinePadding: lastLinePadding),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
backgroundColor: backgroundColor ?? Colors.transparent,
text: painter,
innerRadius: innerRadius,
outerRadius: outerRadius,
firstLinePadding: firstLinePadding,
innerLinePadding: innerLinePadding,
lastLinePadding: lastLinePadding),
backgroundColor: backgroundColor ?? Colors.transparent,
text: painter,
innerRadius: innerRadius,
outerRadius: outerRadius,
firstLinePadding: firstLinePadding,
innerLinePadding: innerLinePadding,
lastLinePadding: lastLinePadding
),

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.

2 participants