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.
16 lines
464 B
Dart
16 lines
464 B
Dart
|
2 years ago
|
import 'package:flutter/material.dart';
|
||
|
|
|
||
|
|
abstract class SizeConfig {
|
||
|
|
static 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;
|
||
|
|
}
|
||
|
|
}
|