I use the flutter_screenutil backage when develop the application on app and I want to use the flutter_screenutil in flutter web I use the size in the resolution of monitor but it does not get the correct size how can I use flutter_screenutil in web and how can get the size to but it in designSize for the flutter_screenutil package
CodePudding user response:
double height = MediaQuery.of(context).size.height;
double width = MediaQuery.of(context).size.width;
You can use the above code without using any package
CodePudding user response:
If you use Get Package then it will be easy
double height = Get.height;
double width = Get.width;
otherwise material way is
double height = MediaQuery.of(context).size.height;
double width = MediaQuery.of(context).size.width;
