devicePixelRatio property

double get devicePixelRatio

The current device pixel ratio.

Implementation

double get devicePixelRatio {
  final data = FlexiInheritedWidget.of(_context, aspect: FlexiAspect.pixelRatio);
  if (data == null) {
    throw FlutterError(
        'FlexiConfig not found in context. Make sure to wrap your app with FlexiConfig.');
  }
  return data.devicePixelRatio;
}