Conversation
… to be more acurrate
| enum ButtonVariant { transparent, primary, secondary, danger } | ||
|
|
||
| enum IconPlacement { leading, trailing } | ||
| enum IconPlacement { leading, trailing, top, below } |
There was a problem hiding this comment.
lets delete the "below" case if we're not using it...
seems a weird design anyway with text above the icon?!
There was a problem hiding this comment.
Yeah, it's not used and seems weird 👍 I just added that for the sake of balance, I guess we don't need it at all
n13
left a comment
There was a problem hiding this comment.
If below is not used, lets remove this case
Otherwise nice and clean
| mainAxisAlignment: MainAxisAlignment.center, | ||
| spacing: 8, | ||
| children: [ | ||
| if (iconPlacement == IconPlacement.top && icon != null) icon!, |
There was a problem hiding this comment.
this if can also go now.. since it's the only case possible
There was a problem hiding this comment.
this part iconPlacement == IconPlacement.top
There was a problem hiding this comment.
Ohh yeah, we can delete it
There was a problem hiding this comment.
But wait, icon can be null, so we have to make sure icon is not null
There was a problem hiding this comment.
Wew so dart has new syntax for exactly this case
Changes
Screenshots