init method
Implementation
void init(BoxConstraints constraints, Orientation orientation) {
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;
}
_blockWidth = (_screenWidth! / 100);
_blocHeight = _screenHeight! / 100;
textMultiplier = _blocHeight;
imageSizeMultiplier = _blockWidth;
heightMultiplier = _blocHeight;
widthMultiplier = _blockWidth;
screenHeightConstant = (_screenWidth!* 0.031);
fontConstant = (screenHeightConstant! / 12.5);
print(SizeConfig.screenHeightConstant);
}