dual_scroll

Creator: coderz1093

Last updated:

0 purchases

dual_scroll Image
dual_scroll Images

Languages

Categories

Add to Cart

Description:

dual scroll

A Flutter plugin to provide platform independent/dependant scrolling and panning functionality #
Features #

This package can scroll horizontally and vertically, the scroll is locked once it is scrolled in a particular direction.
This package uses touch gestures on Mobile Platforms and Mouse/Trackpad inputs on Desktop/Web.

Note #

We have removed the synaptics_driver_fix_windows package as it is discontinued.

Getting started #
Add dual_scroll: ^0.0.9 to your pubspec.yaml under dependencies section as follows.
dependencies:
# Your other dependencies...
dual_scroll: any
# Your other dependencies...
copied to clipboard
Run flutter pub get to get the package.
Alternatively, your editor might support
flutter pub get
Usage #
Start by importing the package
import 'package:dual_scroll/dual_scroll.dart';
copied to clipboard
Use by wrapping the Widget You want to be scrollable in the following way:
return DualScroll(
verticalScrollbar: ScrollBar.defaultScrollBar(),
horizontalScrollbar: ScrollBar.defaultScrollBar(),
child: Container(), /* Your child widget here*/
);
copied to clipboard
Usage with ListView/GridView/Scrollable Widgets as Child/Children #
To use the DualScroll widget while having a ListView/GridView/Scrollable Widget(s) as its child/children, initialize DualScroll in this way:
return DualScroll(
verticalScrollController: yourVerticalScrollController,
horizontalScrollController: yourHorizontalScrollController,
verticalScrollbar: ScrollBar.defaultScrollBar(),
horizontalScrollbar: ScrollBar.defaultScrollBar(),
child: Container(), /* Your child widget here*/
);
copied to clipboard
Customizing Additional Properties #
You can pass ScrollBarSettings to the DualScroll widget in the constructor with appropriate parameter (It is not necessary to provide all parameters):
var scrollBarSettings = ScrollBarSettings(
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag, // Defaults to ScrollViewKeyboardDismissBehavior.manual
clipBehavior: Clip.none, // Defaults to [Clip.hardEdge]
verticalRestorationId: 'vertId', // Defaults to null
horizontalRestorationId: 'horizId', // Defaults to null
verticalPhysics = const ClampingScrollPhysics(), // Defaults to BouncingScrollPhysics
horizontalPhysics = const ClampingScrollPhysics(), // Defaults to BouncingScrollPhysics
verticalPadding: const EdgeInsets.all(8.0), //Defaults to null
horizontalPadding: const EdgeInsets.all(8.0), //defaults to null
);

return DualScroll(
// scrollBars and scrollControllers here
settings: scrollBarSettings, //Optional
pillColor: Colors.blueAccent, //Optional
dimmedPillColor: Colors.blueAccent.withOpacity(0.8), //Optional
trackColor: Colors.blueAccent.withOpacity(0.8), //Optional
trackColorDimmed: Colors.blueAccent.withOpacity(0.6), //Optional
hoverColor: Colors.blue.withOpacity(0.85), //Optional
child: child, // Required
);
copied to clipboard
Additional information #
If you experience any issues, please file those here on Github. If you want to contribute to this repo, open a PR on Github. If you want to view the API in detail, visit dual_scroll on our website.
Also, We would really appreciate if you view our website and our apps.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.