getScreenSize function
Implementation
({int width, int height}) getScreenSize() {
final size = ui.PlatformDispatcher.instance.views.first.physicalSize;
final ratio = ui.PlatformDispatcher.instance.views.first.devicePixelRatio;
return (
width: (size.width * ratio).round(),
height: (size.height * ratio).round(),
);
}