ImprovedScrolling class
Improved scrolling for Flutter Web and Desktop
Must wrap scrollables such as SingleChildScrollView or ListView in order to provide scrolling features that a normal user would expect from a website or a desktop app
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ImprovedScrolling
Constructors
- ImprovedScrolling({Key? key, required ScrollController scrollController, bool enableMMBScrolling = false, bool enableKeyboardScrolling = false, bool enableCustomMouseWheelScrolling = false, MMBScrollConfig mmbScrollConfig = const MMBScrollConfig(), KeyboardScrollConfig keyboardScrollConfig = const KeyboardScrollConfig(), CustomMouseWheelScrollConfig customMouseWheelScrollConfig = const CustomMouseWheelScrollConfig(), void onScroll(double offset)?, void onMMBScrollStateChanged(bool scrollingActive)?, void onMMBScrollCursorPositionUpdate(Offset localCursorOffset, MMBScrollCursorActivity cursorScrollActivity)?, required Widget child})
-
Constructor
const
Properties
- child → Widget
-
Scrollable child widget
final
- customMouseWheelScrollConfig → CustomMouseWheelScrollConfig
-
Configuration for programatically scrolling using mouse wheel
final
- enableCustomMouseWheelScrolling → bool
-
Enables scrolling the view programatically when using mouse wheel
This is done using a scroll listener
final
- enableKeyboardScrolling → bool
-
Enables scrolling using theese keys:
final
- enableMMBScrolling → bool
-
Enables scrolling using the middle mouse button (MMB), in two ways:
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardScrollConfig → KeyboardScrollConfig
-
Configuration for keyboard scrolling
final
- mmbScrollConfig → MMBScrollConfig
-
Configuration for middle mouse button scrolling
final
- onMMBScrollCursorPositionUpdate → (void Function(Offset localCursorOffset, MMBScrollCursorActivity cursorScrollActivity)?)
-
Callback which fires when the MMB scrolling
cursor's local position changes
final
- onMMBScrollStateChanged → (void Function(bool scrollingActive)?)
-
Callback which fires when the MMB scrolling state is changed
final
- onScroll → (void Function(double offset)?)
-
Callback which fires when the wrapped scrollable's scroll offset changes
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController
-
The scroll controller must also be supplied
to the wrapped scrollable widget.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ImprovedScrollingState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited