Open Sesa1988 opened 2 years ago
Hi @Sesa1988 ! Thanks for the issue.
I just tested it on the web and apparently everything is OK.
Now I have a problem. I don't have macOS to test :cry:. Can I borrow yours? :smile: . I'll see what I can do.
Hi @Sesa1988 ! Thanks for the issue.
I just tested it on the web and apparently everything is OK.
Now I have a problem. I don't have macOS to test 😢. Can I borrow yours? 😄 . I'll see what I can do.
I think it has something to do with the scroll bouncing effect that is now default on macOS after upgrading flutter to 3.3.4. Instead of bouncing it freezes and is not scrollable anymore.
Hi @caduandrade
I try to scroll all the time via trackpad and at some point it scrolls but blocks the scrolling for the most part. Sometimes the bounce effect is visible when you reach the end it freezes before that.
The example above was actually on the 1.5.1 version. I tested it with the latest version and I can't scroll at all there. I see the scrollbar, can move it manually with dragging but I can't scroll via trackpad.
I have a footer and the table is above but even just with the table its not scrollable via trackpad.
return Column(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(child: _getTable(context)),
if (maxCount > pageSize)
SizedBox(child: _getFooter(context), height: 50),
],
);
I noticed also that if I wrap the table with a ScrollConfiguration also dragging with pressing down on the trackpad does not work as well. Hope this helps for reproduction :)
return Column(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
child: ScrollConfiguration(
child: _getTable(context),
behavior: ScrollConfiguration.of(context).copyWith(
dragDevices: {
PointerDeviceKind.mouse,
PointerDeviceKind.touch,
PointerDeviceKind.trackpad,
},
),
),
),
if (maxCount > pageSize)
SizedBox(child: _getFooter(context), height: 50),
],
);
Hi @Sesa1988!
As I don't have a mac, would it be possible for you to test a code for me to see if it solves the problem?
You will need to clone the repo from here and change the lib/src/internal/table_scrollbar.dart
file.
Find for ScrollConfiguration
and add the dragDevices:
ScrollConfiguration(
behavior: ScrollConfiguration.of(context)
.copyWith(scrollbars: false,
dragDevices: {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
PointerDeviceKind.invertedStylus,
PointerDeviceKind.trackpad
}),
After this, go to your project and change the pubspec.yaml
to use an path to your the easy_table, example:
easy_table:
path: /cadu/easy_table_flutter
Hi @caduandrade
That's no problem, I'll test it in the next few days or next week.
Hi @Sesa1988!
As I don't have a mac, would it be possible for you to test a code for me to see if it solves the problem? You will need to clone the repo from here and change the
lib/src/internal/table_scrollbar.dart
file.Find for
ScrollConfiguration
and add the dragDevices:ScrollConfiguration( behavior: ScrollConfiguration.of(context) .copyWith(scrollbars: false, dragDevices: { PointerDeviceKind.touch, PointerDeviceKind.mouse, PointerDeviceKind.invertedStylus, PointerDeviceKind.trackpad }),
After this, go to your project and change the
pubspec.yaml
to use an path to your the easy_table, example:easy_table: path: /cadu/easy_table_flutter
Hi @caduandrade
I tested it and it does not fix the issue but I also tested your example application and the same issue is present there.
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "example debug",
"cwd": "example",
"request": "launch",
"type": "dart",
"flutterMode": "debug",
"args": [
"-d",
"macos",
]
},
]
}
I added also the platform an android but this don't helped as well.
Could you open a bug on the flutter repository with your repository? Your example application is great with that.
Hi @Sesa1988 !
Could you make one more attempt? Just checkout the bugfix/50-scrolling-trackpad
branch and test.
Hi @Sesa1988 !
Could you make one more attempt? Just checkout the
bugfix/50-scrolling-trackpad
branch and test.
I tested the example application on your bugfix branch and its the same issue.
Hi @Sesa1988 !
Could you make one more attempt? Just checkout the
bugfix/50-scrolling-trackpad
branch and test.
Im not sure this could be related. https://github.com/flutter/flutter/issues/114889
I think so. :-(
I think so. :-(
I opened a bug and someone mentioned this solution. I tested it and this works but Im not sure if this is enough for your feature set but maybe it's enough for a right direction. (https://github.com/flutter/flutter/issues/115428#issuecomment-1317338914)
onPointerPanZoomUpdate: (e) {
if (e.panDelta.dy != 0) {
_scrollControllers.vertical.position.pointerScroll(-e.panDelta.dy);
}
},
your previously called _onScroll(pointerSignal.scrollDelta.dy, themeMetrics.row.height); but Im not sure what's the difference there but you know better then me :)
Hi @Sesa1988 ! If it's working for you, that's ok. Is it possible for you to make a merge request? But attention because I did a merge today. Please update your code first. Use the main
branch.
Hi @Sesa1988 ! If it's working for you, that's ok. Is it possible for you to make a merge request? But attention because I did a merge today. Please update your code first.
I think it would be easier for you to update. Im not sure if this solution is valid, I pasted it in and it worked.
In your fix branch you added this event already just with another implementation.
@Sesa1988 , you made this change in _EasyTableState
of table.dart
right?
@Sesa1988 , you made this change in
_EasyTableState
oftable.dart
right?
Yes, around line 200 in table.dart
@Sesa1988 ,
I made a commit to the main
branch. Can you test it? On web and linux desktop this event is not fired. I have no way to test. I just thought it was weird to use a negative value as if on macOS it was inverted...
If it's ok for you, I'll publish it as a patch.
@Sesa1988 ,
I made a commit to the
main
branch. Can you test it? On web and linux desktop this event is not fired. I have no way to test. I just thought it was weird to use a negative value as if on macOS it was inverted...If it's ok for you, I'll publish it as a patch.
Yea thats weird but even the scroll-settings on macOS are weird so who knows :D
I will test it now.
@caduandrade It works, thats great! :)
@Sesa1988 , version 2.1.0
released! Thank you for your help!
@Sesa1988 , version
2.1.0
released! Thank you for your help!
I just noticed that there is no velocity, its scrolling but stops instantly.
Maybe this is now a smaller fix? @caduandrade
Hi,
after the update to Flutter 3.3.0 the table keeps freezing when multiple entries are in and Im scrolling. I think they changed internally how scrolling works and maybe thats part of the issue.
I tested it on macOS via trackpad and not sure if this happens as well on Android, iOS, Windows or web.
Current behaviour Table is not scrollable
Expected behaviour Table will scroll