Skip to content

feat: shape and side for SlidableAction and CustomSlidableAction - #255

Open
Arenukvern wants to merge 5 commits into
letsar:masterfrom
Arenukvern:master
Open

Arenukvern wants to merge 5 commits into
letsar:masterfrom
Arenukvern:master

Conversation

@Arenukvern

Copy link
Copy Markdown

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!

@letsar letsar left a comment

Copy link
Copy Markdown
Owner

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 thread lib/src/actions.dart Outdated
Comment on lines +26 to +27
this.shape = const RoundedRectangleBorder(),
this.side = BorderSide.none,

Copy link
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

thank you, fixed

Comment thread lib/src/actions.dart Outdated
/// [OutlinedBorder] of action, if is null, then [RoundedRectangleBorder]
/// used by default
/// {@endtemplate}
final OutlinedBorder shape;

Copy link
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread lib/src/actions.dart Outdated
/// {@template slidable.actions.side}
/// [BorderSide] of action, if is null, then [BorderSide.none] used by default
/// {@endtemplate}
final BorderSide side;

Copy link
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread lib/src/actions.dart Resolved
Comment thread lib/src/actions.dart Outdated
this.icon,
this.spacing = 4,
this.label,
this.shape = const RoundedRectangleBorder(),

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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