Repository navigation
feat: shape and side for SlidableAction and CustomSlidableAction - #255
Open
Arenukvern wants to merge 5 commits into
Open
Arenukvern wants to merge 5 commits into
Arenukvern wants to merge 5 commits into
Conversation
letsar
requested changes
Nov 12, 2021
letsar
left a comment
Owner
There was a problem hiding this comment.
Thanks for this nice evolution! I have just small requests to let the default values to be in one place only.
Comment on lines
+26
to
+27
| this.shape = const RoundedRectangleBorder(), | ||
| this.side = BorderSide.none, |
Owner
There was a problem hiding this comment.
It would be better if we let them null by default so that we can easily extend this class and keep the default values without redefining them.
| /// [OutlinedBorder] of action, if is null, then [RoundedRectangleBorder] | ||
| /// used by default | ||
| /// {@endtemplate} | ||
| final OutlinedBorder shape; |
Owner
There was a problem hiding this comment.
We should make OutlinedBorder nullable then.
| /// {@template slidable.actions.side} | ||
| /// [BorderSide] of action, if is null, then [BorderSide.none] used by default | ||
| /// {@endtemplate} | ||
| final BorderSide side; |
Owner
There was a problem hiding this comment.
We should make BorderSide nullable too.
| this.icon, | ||
| this.spacing = 4, | ||
| this.label, | ||
| this.shape = const RoundedRectangleBorder(), |
Owner
There was a problem hiding this comment.
By following the previous comment, we dont' need to redefine them here.
Co-authored-by: Romain Rastel <rromain35@gmail.com>
Author
|
@letsar thank you for your review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, thank you very much for your awesome project!
This PR I would like to propose adding two small changes:
The shape and side for SlidableAction and CustomSlidableAction make SlidableAction more modifiable.
Thank you!