Screen scroll not starting from beginning - Flutter - flutter

I am helping contribute a code and am stuck on a scrolling bug in flutter.
The screen when opened is started from the Google Maps widget
like this
But when I hold the screen and scroll above then the top content is displayed like this
Now, I cannot interact with the top content since when I release the scroll hold it bounces back to start at the map.
I hope I made senseI cant attach a video here to describe it more accurately.
Here is the link for the respective file associated with the screen,you can download it to check out the code:
The mobile app UI code starts from line 876.
Any help would be appreciated.

I haven't executed your code because it depends on lot of your other files but from reading your code I think the problem is occurring because of extendBodyBehindAppBar of Scaffold. (Checkout line number 114 in given file). Removing this argument or setting it to false should solve the problem.
From the docs :
If true, and an appBar is specified, then the height of the body is
extended to include the height of the app bar and the top of the body
is aligned with the top of the app bar.
This is useful if the app bar's AppBar.backgroundColor is not
completely opaque.
This property is false by default. It must not be null.

Related

Call IgonrePointer on parent but not child

I am developing my first Flutter app and have a question that I'm not finding an answer to:
I have a static fixed area at the bottom of my screen. Various buttons will be shown here depending on the page. I am using a stack to place this area on top of the rest of the screen, with the page content scrolling underneath my buttons.
The problem I am having is that the button(s) is/are sitting inside of a DecoratedBox, which in turn is sitting in front of my page content. This means that this box is blocking me from clicking on anything below the fixed area (like the button labelled "Programs" in the image)
I have come across the IgnorePointer and AbsorbPointer classes, which allows me to set the decorated box to ignore events. The problem here, however, is that it also causes the buttons in this fixed area to no longer react to events, as they are of course children of the box that I am applying the Igonre/AbsorbPointer classes to.
Is there a way to make the parent decorated box ignore events but have it's children react to them normally?
(blue area must ignore events, and the button must react to events)
Any advice would be greatly appreciated
I think this link should help you solve your problem. I haven't tried it.
Flutter: How to make a ListView transparent to pointer events (but not its non-transparent contents)?

Bootstrap modal pop up issue on Iphone

I am using iframe-resizer for cross domain application, The Iframe loads fine in desktop and andriod devices but on my Iphone, I am facing below issue:
The bootstrap modal pop ups on Iframe app is hiding and flickering behind when I scroll on page.
I tried
-webkit-overflow-scrolling: touch;
on container of Iframe but that does not work.
Any help/suggestion will be highly appreciated.
We fixed the issue by using position:absolute instead of position:fixed
Position fixed and absolute are somewhat similar in behavior. Both use x,y positioning in the view port and both are outside of the DOM document flow so other content is not affected by the placement of containers. Both require zIndex positioning to determine vertical priority in the view stack.
Position fixed keeps the element pinned at whatever position you set it to regardless of the scroll position of the browser. This makes sense in some scenarios where you actually want to scroll the entire page but leave content in place. The key to remember is to not use it when you build have your own scrollable content on the page.
It turns out in my case I don’t really need position:fixed because I manage the position and size of the container and toolbar headers and footers myself anyway. I know where everything is positioned and keep the content area effectively wedged in the middle of the statically sized elements. By way of CSS and media queries I can force the header to the top and the footer on the bottom using fixed sizes which means I can safely use position:absolute.

Ionic header - is it necessary ? how to make it scroll rather than be fixed

Building an ionic app and I noticed that ion-header is always fixed to the top of the page, I cant seem to find a way within the frame work to enable it to scroll with the content so I have now totally removed it from all my pages and just added a header to the in the form of a which has the back button etc
What I am wondering is, if this is the standard way to achieve what I want or is there a better way ? is there any issues i may encounter by removing ion-header etc..
Well the first thing that I must say is that having the header fixed at the top of the page is a standard both on iOS and Android, so that's why Ionic does it - mobile app users expect your app to behave like that just like 99% of the rest of the mobile app do.
Is there any issues I may encounter by removing ion-header etc..
Since Ionic expect the header to be in a specific place within your pages, you may have issues related to:
Page transitions: Like you can see in this answer the iOS page transition won't work properly if the header is not placed where Ionic expects it to be.
"Overscrolling" on iOS: When you are at the top of the page and you still try to scroll a bit to the top on iOS, you'd expect the content of the page to scroll but the header to remain in the same position. If the header is not fixed at the top you'd see a section with a white color background at the top of the page when overscrolling.
iPhone X safe areas: Ionic uses some CSS rules to make sure the header has some extra padding at the top in devices like the iPhone X to handle the top notch that those devices have. If you place the header in a different way, you may need to fix that manually with your own CSS rules.
Status bar overlapping: Also related to the previous item, the header prevents the content to be shown behind the iOS status bar. If you don't have a header, you may need to add some extra padding to your content to avoid this.
If you really need to hide the header in your app, one way to avoid these issues would be to make the header to be hidden when the user scrolls. That way the header would still be where Ionic wants it to be, but it will go away as soon as the user scrolls (this is also a known pattern that some apps do). Please take a look at this amazing post to know how to do something like this:

Tinyscrollbar not working with drag

I use the tinyscrollbar plugin on a site in a couple of sections.
So far, it was working great. But now for some reason, the scroll is avaible with the mousewheel but not with the drag/drop slider..
The resolution i'm using is 1360x768, but I test it in a 1920x1080 and the drag WORKS!
I check with firebug if the problem is an overlapping element over the slider but I can't see anything..
I didn't post any code, because I didn't make any changes on tinyscrollbar.js..
If you upgraded to windows 8 there is a bug where it only registers screen touch instead of both the screen and mouse... so you will need to address that
Check the z-index of the scroll bar element places it ontop of everything else (an arbitarily high z-index is fine for this purpose) as this can sometimes end up behind the custom scroll viewport meaning that when you go to drag the scroll bar you click on the wrong element.

How to build a USAToday type app? Horizontal and Vertical scroll control

I am trying to build an app similar to USAToday i.e. each "article" is a mix of images and text that the user scrolls vertically to read if it covers more than than the size of the screen. Scrolling horizontally brings up the next article and so on.
Each article should have "paging enabled" so that the content moves as if you are turning a page in a book whether you are moving vertically or horizontally.
I must have looked at every tutorial for Scroll and Page navigation, but I am drawing a blank. Any help is much appreciated.
BTW: I have down loaded this tutorial....
http://www.edumobile.org/iphone/iphone-programming-tutorials/pagecontrol-example-in-iphone/
... but (a) it builds ok but simulator only shows a featureless black screen, and I cannot work out how to correct it, and (b) it only scrolls horizontally.
The sample code that you reference is old so I think something has changed in the SDK since then. I was able to at least get the code to run by changing the MainWindow.xib file. I opened that file in Interface Builder and then selected the Window and then in the Window Attributes Inspector I ticked "Visible at Launch". Then the tutorial would at least run and show the colors. I think you might find that there are more issues with it though.
When you are wanting to page something, the real trick is setting the content size of the scroll view.
This StackOverflow question has some good information that might help you get going.