navBarHeightFrom static method
Computes the navigation-bar height from a padding inset and device pixel ratio.
Extracted from navigationBarHeight so the math is unit-testable
without a live MediaQuery / platform view. Only the bottom inset
(the navigation-bar gesture area) is divided by dpr; subtracting the
status-bar inset, as the old formula did, yields a wrong — often
negative — value.
Implementation
@visibleForTesting
static double navBarHeightFrom(EdgeInsets padding, double dpr) {
return padding.bottom / dpr;
}