getWidth method

double getWidth(
  1. BuildContext context, {
  2. double size = 1,
})

Get screen width, can be resize with size between 0 and 1.

Implementation

double getWidth(BuildContext context, {double size = 1}) {
  size = _validateSize(size);

  return MediaQuery.of(context).size.width * size;
}