> There is InteractiveViewer[0] but it does not actually cause a re layout of it's children and it also doesn't respect the ScrollBehavior of the platform. There is also Two Dimensional Scrollables[1] which is a new official Flutter package which could theoretically be used to create a better zoom widget, although this hasn't been done AFAIK. There are some packages that can do this though.
I have played with InteractiveViewer, but you can't easily get BoxFit to behave right (if you zoom in on a widget having letter-/pillar-boxing, the letter-/pillar-boxing shouldn't be part of the content you're zooming into!), and it does not stack well with pages and dismissables. There are packages that try to hack around this (poorly) by monitoring position and toggling the activity of parent widgets, and there are some that have their own custom version of the whole thing (with usually quite primitive zoom behavior as a result), but I haven't found any that work well.
My test for this was that even though I could navigate a gallery page with zoom and dismiss reasonably well, my wife's much faster paced zoom/swipe navigation basically never worked. I also tried going the fully custom approach, with my own scrollables, gesture handling and transforms, but it was too much work in the end...
It would definitely be interesting to see if the two_dimensional_scrollables thing sorts it out. I'm not sure all the issues can be fully fixed without a change to flutters Gesture system though - being unable to distinguish pan from
> As for Cupertino being a bad reproduction of the real iOS behavior, is it really that noticeable to non-developers?
I recall showing a cupertino based app to a friend, and the moment he saw the app bar transition he just went "ew what is wrong with that", and the app bar blur looking different didn't help either.
For many of the other things, it just puts more work on the developer - like the trailer thing, where I ended up having offset the widgets pixel by pixel until it aligned with other apps and looked right.
The more consistent UX on iOS (note: "more", not "fully") makes it pretty easy to see when something sticks out, and transitions and their tracking in particular is something that has always been a few notches above the average on Apple devices.
Another thing that sticks out a lot are hero transitions. Native iOS apps tend to have content nicely expand from e.g. a small grid to a larger page. In Flutter, this is a pain because you might need to transition between both aspect ratios and fitments (e.g., BoxFit.cover to BoxFit.contain), while the Hero widget doesn't really give you an easy way to know both the source and target dimensions ahead of time to calculate the intermediate geometry and fitment, only the source and current dimensions. The best I have managed gets it mooostly right when the aspect ratio of the content ends up matching the aspect ratio of the screen, but it's visibly wonky when that's not the case - the image first expanding, then contracting again to obtain the right borders. The same goes in the other direction, with the widget dancing too much when dismissed.
I feel that a lot of things just bail out to a more material-style crossfade, which is not very Apple-esque.
> FWIW I can't reproduce this in my own Cupertino app. For example a 3 column grid becomes a 6 column grid when rotated.
Look at the widgets during the rotation. If you rotate from portrait to landscape, the widgets will first be stretched as flutter is transforming a render from the "before" position towards the new dimensions. Then, slightly past halfway it snaps to instead transforming an "after" render with the GridView relayout, which starts slightly too narrow and grows to the proper dimensions. Leaving the app in one orientation and returning in another can also lead to cursed frames. :)
While bailing out to a cross-fade for heros is bad, I wish Flutter would just only cross-fade for the rotation. Stretching is just... Cursed. At the same time, we should have more control so we can do things like the iOS camera app and react by just rotating some widgets in-place...
---
Disclaimer: It's been a year or so since I played with flutter last, and I am not currently during UI work so I might be slightly out of date and there might have been improvements since I looked at it last. I should also note that I have personally now also started to be able to pick apart many first-party Apple apps, breaking them horribly in numerous ways because I have gotten familiar with the problems. It's just that they usually don't break for regular end-users.