weightOf static method

WeightDimen weightOf(
  1. String name,
  2. Size size
)

Implementation

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