getRatioCtx static method

double getRatioCtx(
  1. BuildContext context
)

适配比率。 Ratio.

Implementation

static double getRatioCtx(BuildContext context) {
  Size size = MediaQuery.of(context).size;
  return (size.width > size.height ? size.height : size.width) / _designW;
}