ueman / feedback

A simple widget for getting better feedback.
https://pub.dev/packages/feedback
397 stars 97 forks source link

Bug if you rotate the screen after drawing #142

Open 1rach opened 2 years ago

1rach commented 2 years ago

Version

2.2.1

Library

feedback

Flutter channel

stable

Flutter version

2.8

Platform

Android, iOS, Web

Details

Thanks for this interesting package 👍.

I’ve found a bug :

when I took a screenshot and then I draw then finally I rotate the screen the drawing is not displayed correctly.

Steps to reproduce

1 screenshot 2 draw something 3 rotate the device

Output of flutter doctor -v

No response

ueman commented 2 years ago

Hey, thanks for reporting. What would you expect to happen instead?

1rach commented 2 years ago

For example, take a look at this image :

Before rotation (screen is horizontal): image

After rotation (screen is vertical after rotation) : image

As you can see, the "green plus", is on the blue button on the first screenshot, but the position is not correct on the second screenshot.

Let me know if I'm not clear.

calcitem commented 2 years ago

I cannot see the difference.

ueman commented 2 years ago

I do understand the problem. I was just asking what you're expecting as the solution to the problem.

When you're rotating from horizontal to portrait you could have drawings which are cut off on the sides, because the screen isn't as wide anymore. Shrinking the drawing to fit the screen doesn't make much sense, I guess, because you're drawing to point something out about the UI which changed because of the rotation.

So I think it kinda makes sense to delete the drawing on rotations, though that's also not a nice UX.

Maybe the rotation should be disallowed while drawing.

What are your thoughts on this?

ueman commented 2 years ago

It's currently not possible to read the current device orientation with Flutter. I've created an issue for that: https://github.com/flutter/flutter/issues/95719

caseycrogers commented 2 years ago

What about aligning the drawing to the center of the screen so that if the device orientation changes, the drawing at least remains centered?

eg if the window reduces n units on the x axis, the drawing will be shifted left by n/2 units.