import 'package:flutter/material.dart'; abstract class SizeConfig { static late MediaQueryData _mediaQueryData; static double? screenWidth; static double? screenHeight; static double? defaultSize; /// Call this method to save the height and width of the available layout static void init(BuildContext context) { _mediaQueryData = MediaQuery.of(context); screenWidth = _mediaQueryData.size.width; screenHeight = _mediaQueryData.size.height; } }