screenWidth property
double
get
screenWidth
The 'logical' width of the screen
Implementation
double get screenWidth {
double logicalWidth;
final context = this.context;
if (context == null) {
final size = mainWindow.physicalSize / mainWindow.devicePixelRatio;
logicalWidth = size.width;
} else {
logicalWidth = MediaQuery.of(context).size.width;
}
return logicalWidth;
}