Untitled

 avatar
unknown
plain_text
5 months ago
403 B
2
Indexable
import 'package:flutter/material.dart';

class ScreenSize {
  static final ScreenSize _instance = ScreenSize._internal();

  factory ScreenSize() {
    return _instance;
  }

  ScreenSize._internal();

  late double width;
  late double height;

  void init(BuildContext context) {
    width = MediaQuery.of(context).size.width;
    height = MediaQuery.of(context).size.height;
  }
}
Editor is loading...
Leave a Comment