getScreenHeight method
Implementation
double getScreenHeight() {
// Special 0 height condition.
if (activeBreakpointSegment.responsiveBreakpoint.breakpoint == 0) return 0;
// Check if screenWidth exceeds maxWidth.
if (maxWidth != null) {
if (windowWidth > maxWidth!) {
// Check if there is an active breakpoint with autoScale set to true.
if (activeBreakpointSegment.breakpoint > maxWidth! &&
activeBreakpointSegment.responsiveBreakpoint.isAutoScale) {
// Scale screen height by the amount the width was scaled.
return windowHeight / (screenWidth / maxWidth!);
}
}
}
// Return default window height as height.
return windowHeight;
}