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

feat: shape and side for SlidableAction and CustomSlidableAction #255

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Arenukvern
Copy link

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!

Copy link
Owner

@letsar letsar left a comment

Choose a reason for hiding this comment

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

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,
Copy link
Owner

Choose a reason for hiding this comment

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

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.

Copy link
Author

Choose a reason for hiding this comment

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

thank you, fixed

/// [OutlinedBorder] of action, if is null, then [RoundedRectangleBorder]
/// used by default
/// {@endtemplate}
final OutlinedBorder shape;
Copy link
Owner

Choose a reason for hiding this comment

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

We should make OutlinedBorder nullable then.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

/// {@template slidable.actions.side}
/// [BorderSide] of action, if is null, then [BorderSide.none] used by default
/// {@endtemplate}
final BorderSide side;
Copy link
Owner

Choose a reason for hiding this comment

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

We should make BorderSide nullable too.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@@ -123,6 +135,8 @@ class SlidableAction extends StatelessWidget {
this.icon,
this.spacing = 4,
this.label,
this.shape = const RoundedRectangleBorder(),
Copy link
Owner

Choose a reason for hiding this comment

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

By following the previous comment, we dont' need to redefine them here.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@Arenukvern
Copy link
Author

@letsar thank you for your review!
made suggested changes and merged with updated master - should be no merge conflicts now

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