aloisdeniel / flutter_device_preview

Approximate how your app looks and performs on another device.
https://aloisdeniel.github.io/flutter_device_preview/
MIT License
2.21k stars 343 forks source link

Compatibility issue with recent Flutter versions #244

Open ziad-ezzat opened 6 months ago

ziad-ezzat commented 6 months ago

Hello,

I'm currently using the device_preview package in my Flutter project. However, I've encountered some issues when trying to run my application with recent versions of Flutter.

Here are the error messages I'm getting: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'. Error: No named parameter with the name 'toggleableActiveColor'.

It seems like these properties have been removed in recent versions of Flutter, causing the application to fail to compile.

I'm currently using Flutter version 3.21.0-1.0.pre.2

Could you please look into this issue and provide a fix or update the package to be compatible with recent Flutter versions?

Thank you for your help.

alirezat66 commented 6 months ago

It also provide problem in run test, I had to comment it from my project for now.

subzero911 commented 6 months ago
image

same here incompatible to Flutter 3.22

subzero911 commented 6 months ago

By the way, I asked Flutter team to make the same tool out of the box, please give some thumbs up https://github.com/flutter/devtools/issues/7336

mister-rao commented 6 months ago

just upgraded to flutter v3.22 and the project won't run. It was a good package to quickly preview app on different screen sizes. Seems like removing this package from dependency is the only solution as of now.

vijayvaghela72 commented 6 months ago

need solution please update this package for flutter v3.22 .

viniaf13dti commented 6 months ago

Same problem and also had to remove it from my project after updating to v3.22. I hope it gets fixed soon🤞

halfaHalfawy commented 6 months ago

same issue ,will remove it until fix.

elmermj commented 6 months ago

ziad

Here, try this one. I've just updated it today and haven't been able to test it . It will mean so much if you guys can help me with the tests.

Disclaimer: I'm not the original author.

Link: https://github.com/elmermj/device_preview_2-beta.git

mattia-venturini commented 6 months ago

Is this solved with version 1.2.0? Now it seems to build and run fine.