-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Added a clarification on scrollBehaviour in BoxScroll and ListView #107738
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
Conversation
/// [ScrollBehavior] cannot be provided because it is only exposed | ||
/// in widgets where the scrolling is hard-coded due to scrollbars and | ||
/// overscroll indicators, or widget-specific [ScrollPhysics]. |
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.
This kind of assumes the user is aware that other types of scrollable widgets can have a ScrollBehavior provided. If I do not know this, I read this and wonder, what do you mean scroll behavior?
Also, I realized mentioning physics here doesn't make sense since `physics' is a parameter that is already available.
What about something like...
/// [ScrollBehavior] cannot be provided because it is only exposed | |
/// in widgets where the scrolling is hard-coded due to scrollbars and | |
/// overscroll indicators, or widget-specific [ScrollPhysics]. | |
/// [ScrollView]s are often decorated with [Scrollbar]s and overscroll indicators, which are managed by the inherited [ScrollBehavior]. Placing a [ScrollConfiguration] above a ScrollView can modify these behaviors for that ScrollView, or can be managed app-wide by providing a ScrollBehavior to [MaterialApp.scrollBehavior] or [CupertinoApp.scrollBehavior]. |
Feel free to adjust. Thanks for using a template!
@@ -620,6 +620,14 @@ class CustomScrollView extends ScrollView { | |||
|
|||
/// A [ScrollView] that uses a single child layout model. | |||
/// | |||
/// {@template flutter.widgets.BoxScroll.scrollBehaviour} | |||
/// ## Scrolling Behaviour |
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:
/// ## Scrolling Behaviour | |
/// ## Scrolling Behavior |
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.
LGTM
Added a clarification on the docs of BoxScroll and ListView about the access that you have to ScrollBehavior. It seems that
List which issues are fixed by this PR. You must list at least one issue.
Fixes #98003
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.