LastMonopoly / scaled_app

Scale the entire UI design proportionally, useful when your UI design is fixed-width.
https://pub.dev/packages/scaled_app
BSD 3-Clause "New" or "Revised" License
14 stars 8 forks source link

Wrong scaling for web sites with hostElement on mobile browser #5

Open fhuonder opened 1 year ago

fhuonder commented 1 year ago

Hi,

The scaling is wrong when I use the hostElement (introduced in Flutter 3.10). As far as I see the factors taken to calculate the scaling are taken from the window instead of the hostElement. E.g. the hostElement is a div that has only 30% x 30% of the screen size.

Do you have an idea if this is a problem and if yes how a solution could look like?

Regards, Florian

fhuonder commented 1 year ago

Addition: The problem only occurrs on mobile browsers. I tested with Chrome and Firefox on Android. It does not occur when the Chrome Desktop Browser is used (where the DevTools emulate a small screen).

LastMonopoly commented 1 year ago

@fhuonder Thank u for reporting this bug Unfortunately, I'm quite busy recently, I may not be able to solve this problem very soon. So sorry for that.

fhuonder commented 1 year ago

Do you have a workaround?

LastMonopoly commented 1 year ago

Use Iframe maybe?

fhuonder commented 1 year ago

Hi,

iFrame is not an option. I hope that the problem will be fixed soon.