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

isVerticalItemLabel feature added #55

Merged
merged 3 commits into from
Jan 31, 2022
Merged

isVerticalItemLabel feature added #55

merged 3 commits into from
Jan 31, 2022

Conversation

coskuncay
Copy link

isVerticalItemLabel feature makes the labels of the items appear vertically or horizontally.
|

@Frezyx Frezyx self-requested a review January 31, 2022 11:54
Comment on lines 53 to 75
theme.isVerticalItemLabel
? SizedBox(
height: 2,
)
: SizedBox(
width: 2,
),
theme.isVerticalItemLabel
? Text(
model.label!,
style: isSelected
? theme.selectedItemTextStyle
: theme.itemTextStyle,
)
: Expanded(
flex: 2,
child: Text(
model.label!,
style: isSelected
? theme.selectedItemTextStyle
: theme.itemTextStyle,
),
),
Copy link
Owner

Choose a reason for hiding this comment

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

Please use the spread operator to the list

if(theme.isVerticalItemLabel)...[
SizedBox(height: 2,),
Text(
    model.label!,
    style: isSelected ? theme.selectedItemTextStyle : theme.itemTextStyle,
),]
else ...[

}

List<Widget> get _items {
final items = <Widget>[
theme.isVerticalItemLabel ? SizedBox() : Spacer(),
Copy link
Owner

Choose a reason for hiding this comment

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

if(theme.isVerticalItemLabel) Spacer()

Copy link
Owner

Choose a reason for hiding this comment

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

My bad
I didn't pay attention for logic

Copy link
Owner

Choose a reason for hiding this comment

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

Real logic

if(!theme.isVerticalItemLabel) Spacer()

@Frezyx
Copy link
Owner

Frezyx commented Jan 31, 2022

Thank you @coskuncay for this contribution !
Please make a list of issues and I will include these changes in the source code

@coskuncay coskuncay requested a review from Frezyx January 31, 2022 12:24
@coskuncay
Copy link
Author

All requested changes are applied , thank you ! @Frezyx

@Frezyx Frezyx merged commit eeaf371 into Frezyx:master Jan 31, 2022
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.

None yet

2 participants