-
Notifications
You must be signed in to change notification settings - Fork 31
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -32,6 +32,7 @@ class InfiniteList extends StatelessWidget { | |||||||||||||||
this.cacheExtent, | ||||||||||||||||
this.debounceDuration = defaultDebounceDuration, | ||||||||||||||||
this.reverse = false, | ||||||||||||||||
this.shrinkWrap = false, | ||||||||||||||||
this.isLoading = false, | ||||||||||||||||
this.hasError = false, | ||||||||||||||||
this.hasReachedMax = false, | ||||||||||||||||
|
@@ -76,6 +77,12 @@ class InfiniteList extends StatelessWidget { | |||||||||||||||
/// {@endtemplate} | ||||||||||||||||
final bool reverse; | ||||||||||||||||
|
||||||||||||||||
/// {@template shrinkWrap} | ||||||||||||||||
/// Indicates if the extent of the [ScrollView] in the [scrollDirection] | ||||||||||||||||
/// should be determined by the contents being viewed. | ||||||||||||||||
/// {@endtemplate} | ||||||||||||||||
Comment on lines
+82
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?" There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||||||||||||
final bool shrinkWrap; | ||||||||||||||||
|
||||||||||||||||
/// {@template item_count} | ||||||||||||||||
/// The amount of items that need to be rendered by the [itemBuilder]. | ||||||||||||||||
/// | ||||||||||||||||
|
@@ -200,6 +207,7 @@ class InfiniteList extends StatelessWidget { | |||||||||||||||
return CustomScrollView( | ||||||||||||||||
scrollDirection: scrollDirection, | ||||||||||||||||
reverse: reverse, | ||||||||||||||||
shrinkWrap: shrinkWrap, | ||||||||||||||||
controller: scrollController, | ||||||||||||||||
physics: physics, | ||||||||||||||||
cacheExtent: cacheExtent, | ||||||||||||||||
|
There was a problem hiding this comment.
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
.