size property
Size
get
size
Returns the screen size. This method returns the size of the screen using MediaQuery, which includes the width and height. If the MediaQuery context is unavailable, it returns a default size of (0, 0).
Implementation
Size get size => MediaQuery.maybeOf(this)?.size ?? const Size(0, 0);