sizeOf static method

SizeDimen sizeOf(
  1. String name,
  2. Size size
)

Implementation

static SizeDimen sizeOf(String name, Size size) {
  final device = i.device(size);
  final scaleFactor = device.sizeScaleFactor;
  final x = _of(name)?.detect(device.type);
  final y = x is SizeDimen ? x : const SizeDimen.zero();
  return y.scale(scaleFactor);
}