flutterScrollPhysics method
Implementation
ScrollPhysics? flutterScrollPhysics(bool shouldAlwaysScroll) {
final parent = switch (this) {
ScrollPhysicsC.platformDependent => null,
ScrollPhysicsC.bouncingScrollPhysics => const BouncingScrollPhysics(),
ScrollPhysicsC.clampingScrollPhysics => const ClampingScrollPhysics(),
ScrollPhysicsC.rangeMaintainingScrollPhysics =>
const RangeMaintainingScrollPhysics(),
ScrollPhysicsC.neverScrollableScrollPhysics =>
const NeverScrollableScrollPhysics()
};
if (shouldAlwaysScroll) {
return AlwaysScrollableScrollPhysics(parent: parent);
}
return parent;
}