Flutter: Scroll, move widget, everything in the same screen - dart

I'm trying to implement the following screen in Flutter.
It seems trivial to do so, but I couldn't find a way to achieve the same results. This is what I have so far:
My solution without scrolling
Solution following the Flutter demo but placing a map as a SliderAppBar
As you can see, I have a few problems:
This is the most accurate solution (don't look at the small blue widget moving up and down). I can move on the map and scroll through the ListView but I can't move the divider to expand the ListView. Notice that I don't want the ListView to move to the top, but until the user stops.
This one seems the correct solution but, as you can see, there are more problems: The map seems to resize instead of stay the same but just resize its container, and when I scroll down, I see the background of the Scafold.
Any ideas? This is the link to the solution 1.
PD: Sorry for the links to the GIFs. Their size was about 10MB each and I couldn't upload here.

Related

Scroll screen in IOS

I have been trying to find a way to use a background image so that it is larger than the device screen size, IE: the user can scroll from top to bottom and side to side to view the entire image.
This is something I'm looking at in gaming. I just haven't found any way to do this, I know its because I'm looking in the wrong place or asking the question in an incorrect manner, so any help would be appreciated.
For this problem you can use scrollView and insert in it a content view , and give it say 3 times widths/heights of screen , see demo here ScrollAnyway

Free Scrolling in Xcode 8.3.3

I want to create a page with a big image as background and buttons that users can interact with.
So imagine I put a big image such as a piece of map into the screen, but I only show a corner of the map in the display. So if a user wants to see other parts of the map, they have to "scroll" and navigate to wherever they want.
Meanwhile I also want to put a button they can tap on, and that button should lead to a php webpage (in-app, not opening in safari or else) or information page about sites and buildings in this location.
I am a rookie and I haven't have any code written down yet. I am thinking about using UIScrollView and UIButton, but am I on the right direction? Any advice?
Thanks in advance!
First you need a way to pinch zoom the image. In this mode, you can drag the image in any direction that you want. A common method can be found here. A scroll view can only scroll horizontally or vertically but with that image zooming, each image can be zoomed in and then dragged to any direction you want. You can have a scroll view with only one image.
After you have the image zooming ready, all you need to do is to create a subview on your screen to cover part of the image view or scroll view, whatever you used.

React-Native scrollToEnd on iOS behaves differently than scrolling manually, putting items to bottom

Please consider this example on iOS: https://sketch.expo.io/SyeyMSx_il
Try to scroll manually, everything looks normal: No comments message stays on top.
If you click now on the button now, the No comments message sticks to the bottom.
If you scroll manually again, everything goes normal again.
Why using scrollToEnd should be different than scrolling manually? And how to fix this weird behaviour?
Adding to ScrollView contentContainerStyle={{ flexGrow: 1 }} fixed that.
See now: https://snack.expo.io/HkdP9_e1Z
I'm not sure of the cause of the behaviour without digging through the source code for ScrollView but you could get around it by making a function that handles the scroll to end, only triggering it if the size of the contents are greater than the size of the viewport.

How to apply UIView shifts when scrolling between pages

i'm trying to apply a shift effect to subviews of a UIView, but those shifts should'n have the same phase. A good example of that is the welcome screen in SoundClound.
As you can see, in the second image i'm scrolling to the second page, and the label slides more than the image (so it looks that the label moves faster than the image). So the subviews lose the alignment when scrolling, but recover it back if we stop the swipe.
Does anyone know how this effect is named? and where can i find some help to implement it?
Thanks a lot!
"Parallax scrolling" is what you want to search for.
Basically it is done by moving foreground objects faster background objects to simulate depth.
Check out http://blog.denivip.ru/index.php/2013/08/parallax-in-ios-applications/?lang=en for a starting point!

MWPhotoBrowser - Images moving inside view

I am sure this is an easy question, but I am lost. I have MWPhotoBrowser and a bunch of photos loaded into the browser. Everything works beautifully, except if I click on an image in the browser and drag it around the screen it moves everywhere and repositions the image. Essentially I just want to stop if from dragging around all together.
Any recommendations ?
There were two issues causing this problem:
Autolayout was turned off. Since I wanted it to remain off I had to create a work around with #2.
The content appears to be sized to the View. In my case the view height was much larger than the available display area on the screen. To work around the issue I used another view sized to the viewable area and added the browser to that view rather than the super view.

Resources