sw property
double
get
sw
Implementation
double get sw {
try {
return this * MediaQuery.of(AppContext.context).size.width / 100;
} catch (e) {
final physicalSize = WidgetsBinding.instance.platformDispatcher.views.first.physicalSize;
final devicePixelRatio = WidgetsBinding.instance.platformDispatcher.views.first.devicePixelRatio;
final screenWidth = physicalSize.width / devicePixelRatio;
return screenWidth * (toDouble() / 100);
}
}