physicalSize property Null safety

Size physicalSize

The dimensions of the rectangle into which the scene rendered in this view will be drawn on the screen, in physical pixels.

When this changes, onMetricsChanged is called.

At startup, the size of the view may not be known before Dart code runs. If this value is observed early in the application lifecycle, it may report Size.zero.

This value does not take into account any on-screen keyboards or other system UI. The padding and viewInsets properties provide information about how much of each side of the view may be obscured by system UI.

This value is the same as the size member of physicalGeometry.

See also:

Implementation

Size get physicalSize => viewConfiguration.geometry.size;