We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
final double screenHeight = MediaQuery.of(context).size.height; final double screenWidth = MediaQuery.of(context).size.width; print("screenHeightscreenHeight:$screenHeight"); print("screenWidthscreenWidth:$screenWidth"); android_window.open( size: Size(screenWidth, 600), position: Offset(100, 1500), );
用的上面的代码,高度获取是900多,宽度是411
The text was updated successfully, but these errors were encountered:
图中,倒数第二个按钮是用获取的屏幕宽度,悬浮窗也是用的屏幕宽度,差距好大
Sorry, something went wrong.
单位不一样,你获取的是dp,它用的是像素 乘个MediaQuery.of(Get.context!).devicePixelRatio就能转像素了
No branches or pull requests
final double screenHeight = MediaQuery.of(context).size.height;
final double screenWidth = MediaQuery.of(context).size.width;
print("screenHeightscreenHeight:$screenHeight");
print("screenWidthscreenWidth:$screenWidth");
android_window.open(
size: Size(screenWidth, 600),
position: Offset(100, 1500),
);
用的上面的代码,高度获取是900多,宽度是411
The text was updated successfully, but these errors were encountered: