ratioToInt property

int get ratioToInt

Implementation

int get ratioToInt {
  final double pixelRatio =
      PlatformDispatcher.instance.views.first.devicePixelRatio;
  // Returning early as Platform.isAndroid is not available on web and causes errors.
  if (kIsWeb) {
    return (this * pixelRatio).toInt();
  }

  final bool isAndroid = Platform.isAndroid;
  return (this * (isAndroid ? pixelRatio : 1.0)).toInt();
}