getPixelRatio static method

double getPixelRatio(
  1. BuildContext? context
)

Returns the pixel ratio of the current device's display.

Implementation

static double getPixelRatio(BuildContext? context) {
  return MediaQuery.of(context ?? Get.context!).devicePixelRatio;
}