of static method

SizeHelper of(
  1. BuildContext context, {
  2. bool printScreenInfo = false,
})

Implementation

static SizeHelper of(BuildContext context, {bool printScreenInfo = false}) {
  final size = MediaQuery.of(context).size;

  final width = size.width;
  final height = size.height;

  final orientation =
      width > height ? Orientation.landscape : Orientation.portrait;

  final current = orientation == Orientation.portrait ? height : width;

  return SizeHelper._internal(current, size, orientation, printScreenInfo);
}