opt: custom scroll for better scroll and add trackpad support

This commit is contained in:
Kingtous
2022-09-19 21:09:54 +08:00
parent e1ab01a97f
commit df5a2ab556
5 changed files with 16 additions and 5 deletions

View File

@@ -14,7 +14,11 @@ class DesktopScrollWrapper extends StatelessWidget {
return ImprovedScrolling(
scrollController: scrollController,
enableCustomMouseWheelScrolling: true,
customMouseWheelScrollConfig: const CustomMouseWheelScrollConfig(
customMouseWheelScrollConfig: CustomMouseWheelScrollConfig(
scrollDuration: kDefaultScrollDuration,
scrollCurve: Curves.linearToEaseOut,
mouseWheelTurnsThrottleTimeMs:
kDefaultMouseWhellThrottleDuration.inMilliseconds,
scrollAmountMultiplier: kDefaultScrollAmountMultiplier),
child: child,
);