You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/lib/models/size_config.dart

16 lines
472 B
Dart

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;
}
}