Open zzzhhhhh001 opened 1 year ago
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
图中,倒数第二个按钮是用获取的屏幕宽度,悬浮窗也是用的屏幕宽度,差距好大
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