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: expose shrinkWrap of CustomScrollView #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

limcheekin
Copy link

@limcheekin limcheekin commented Aug 20, 2024

Status

READY

Description

I exposed the shrinkWrap option of the CustomScrollView widget to support the top alignment of list items. Please see section "3. Aligning Chat Messages to the Top" of the article at https://medium.com/@ximya/tips-and-tricks-for-implementing-a-successful-chat-ui-in-flutter-190cd81bdc64.

If you think the changes are unnecessary, please let me know the alternative solution.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@limcheekin limcheekin requested a review from a team as a code owner August 20, 2024 08:28
Copy link
Contributor

@alestiago alestiago left a comment

Choose a reason for hiding this comment

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

LGTM, left a few small adjustments regarding documentation.

Any chance we can add some tests to ensure the property gets proxied into CustomScrollView and ensure false is the default?

@@ -76,6 +77,12 @@ class InfiniteList extends StatelessWidget {
/// {@endtemplate}
final bool reverse;

/// {@template shrinkWrap}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: If the @template is not being used elsewhere in a @macro we should remove the @template.

Comment on lines +82 to +83
/// should be determined by the contents being viewed.
/// {@endtemplate}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: consider referencing the property that the value is proxying to.

Suggested change
/// should be determined by the contents being viewed.
/// {@endtemplate}
/// should be determined by the contents being viewed.
///
/// See also:
///
/// * [CustomScrollView.shrinkWrap], for more details about this flag.

Copy link
Author

Choose a reason for hiding this comment

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

Are you waiting for my response?

I not sure how to "add some tests to ensure the property gets proxied into CustomScrollView and ensure false is the default?"

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @limcheekin sorry for the late reply, you can try having a look at a recent PR: #76, to get inspired on how to test it.

@alestiago alestiago self-assigned this Aug 21, 2024
@alestiago alestiago added the waiting for response Waiting for follow up label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for response Waiting for follow up
Projects
Status: Community
Development

Successfully merging this pull request may close these issues.

2 participants