-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conversation
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, | ||
), | ||
), |
There was a problem hiding this comment.
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(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(theme.isVerticalItemLabel) Spacer()
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()
Thank you @coskuncay for this contribution ! |
All requested changes are applied , thank you ! @Frezyx |
isVerticalItemLabel feature makes the labels of the items appear vertically or horizontally.
| ![](https://user-images.githubusercontent.com/29631083/151781868-4af81bcd-833b-41d6-9b54-7a3aa000ab14.png)