init static method
void
init(
- BoxConstraints constraints,
- Orientation orientation,
- double originalHeight,
- double originalWidth,
- BuildContext currentContext,
Implementation
static void init(
BoxConstraints constraints,
Orientation orientation,
double originalHeight,
double originalWidth,
BuildContext currentContext,
) {
_originalWidth = originalWidth;
if (orientation == Orientation.portrait) {
_screenWidth = constraints.maxWidth;
_screenHeight = constraints.maxHeight;
_isPortrait = true;
if (_screenWidth! < 450) {
_isMobilePortrait = true;
}
} else {
_screenWidth = constraints.maxHeight;
_screenHeight = constraints.maxWidth;
_isPortrait = false;
_isMobilePortrait = false;
}
_blockHeight = _screenHeight! / 100;
_blockWidth = _screenWidth! / 100;
_fixedHeightFactor = originalHeight / 100;
_fixedWidthFactor = originalWidth / 100;
_context = currentContext;
}