Document on ScrollPhysics the requirement to override applyTo (#121850)
Document on ScrollPhysics the requirement to override applyTo
This commit is contained in:
@@ -67,6 +67,11 @@ enum ScrollDecelerationRate {
|
||||
/// // ...
|
||||
/// final ScrollPhysics mergedPhysics = physics.applyTo(const AlwaysScrollableScrollPhysics());
|
||||
/// ```
|
||||
///
|
||||
/// When implementing a subclass, you must override [applyTo] so that it returns
|
||||
/// an appropriate instance of your subclass. Otherwise, classes like
|
||||
/// [Scrollable] that inform a [ScrollPosition] will combine them with
|
||||
/// the default [ScrollPhysics] object instead of your custom subclass.
|
||||
@immutable
|
||||
class ScrollPhysics {
|
||||
/// Creates an object with the default scroll physics.
|
||||
|
||||
Reference in New Issue
Block a user