I have a list in an RTL document. When I use ion-scroll for direction x it adds scroll to the left side of the content, which makes it impossible to scroll to the right. How can I fix this?
Related
I have programmed a modal buttom sheet which with this package (using a showCupertinoModalBottomSheet). This modal has a "header" which shows the heading and a close button on the left so the user knows what the modal is about and has a "footer" with two buttons to either apply the filter or reset it.
Between the header and the footer is a a Expanded component with a SingleChildScrollView inside in order to scroll inside the modal. This is needed because there are more filter options available than space! I am very happy that I found a solution without a SizedBox component which has a given height because the height of smartphones vary.
However, now I am facing one last problem: Sadly I am not able to scroll to the bottom of my SingleChildScrollView. This problem also occurs when removing the "footer" with the two buttons. Means, the SingleChildScrollView goes beyond the screen height (which is fine) but which is useless when I am not able to scroll to the bottom of my list. At the end of this post I have added an image so you can see the problem.
Here you can find my dartpad without the modal buttom sheet which is not supported yet on dartpart. However, because dartpad presents the web view instead of the mobile view I am not able to recreate the problem 100%. When using the mouse wheel to scrol you can scroll to the end of the list. But as you can see in the image below in the mobile version is does not work!
Does anyone has an idea how I can solve this?
I already have tried adding Containers with padding and margin to the bottom but this sadly doesn't work or leads to rendering issues.
There is also a stackoverflow post which seems to solve this problem but that leads to an rendering issue for me: https://stackoverflow.com/a/63613723/9445999
Image:
Kind regards and thank you!
I need to use Scrollbar widget for web as it enables scrollbar always on AND the ability to edit its size and width. I also have to use it with a child that is scrollable (singlechildescrollview, listview, etc), but after updating to flutter 2.2, I've seen that 2 scrollbars appear on screen and keeps buging the experience (can be seen when changing the size of the scrollbar in the parent).
I've tryed to disable the scrolling in the child, but its scrollbar still shows. I cant use the default scrollbar in the child, as its more geared towards mobile.
Fixed using rawascrollbar. It removes any padding when pressing on the side of the screen, and gives the ability to change the color of scrollbar (that way hides the child scroll). Better then the Scrollbar widget.
I am looking to create in Flutter a modal dialog that slides in from the bottom and
Appears with a given height (eg. 1/3 of the screen)
Expands vertically if the user scrolls up on it (and shrinks until disappearing if the user scrolls down)
Provides some kind of callback or observable so that I can know when it reaches the top of the screen/parent. (I need this in order to create a back arrow on the top left corner of the panel itself)
Is there any way to achieve this?
I have found the package sliding_up_panel to be really nice, but lacking the third feature.
The SlidingUpPanel does actually have everything you need. You want to use the onPanelSlide property from it which will provide you the current % opened of the panel normalized ([0, 1.0]), so if you want to know when it reaches the top you, it's when its current position is at 1.0.
As an alternative, you may want to take a look at DraggableScrollableSheet widget, but IMO, SlidingUpPanel is more versatile.
Is it possible to add new elements into the top of the ListVeiw or CustomScrollView and keep the scroll position as it's with Flutter
I've tried the following
extentAfter = _scrollController.position.extentAfter;
_scrollController.jumpTo(_scrollController.position.maxScrollExtent - extentAfter);
but this won't work well with SliverAppBar - floating and its actually not optimal solution.
Actually the cleanest way would be to add those items only when user scrolls back to the top of the ListView. You can cache them in memory for the moment user is far enough from the top (in your case) of the list.
I am trying to set the scrollbar on JScrollPane. By default vertical scrollbar appear on right, and horizontal scrollbar appear on bottom of the content pane. I need to change the direction, i.e. vertical scrollbar on left, and horizontal scrollbar on top. I used the method
scrollPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
that changes the vertical scrollbar appear on left, but unable to change the horizontal scrollbar to top. Can anyone help in this regard?
After looking at the available orientations:
java.awt.ComponentOrientation.LEFT_TO_RIGHT
java.awt.ComponentOrientation.RIGHT_TO_LEFT
java.awt.ComponentOrientation.UNKNOWN
it would seem that what you're trying to do isn't supported.
I would have to ask why you would want to do this anyway though? I would imagine that having a horizontal scrollbar at the top would have a detrimental effect on usability.
There may be a good reason why it's not supported.