WindowPadding class Null safety

A representation of distances for each of the four edges of a rectangle, used to encode the view insets and padding that applications should place around their user interface, as exposed by FlutterView.viewInsets and FlutterView.padding. View insets and padding are preferably read via MediaQuery.of.

For a generic class that represents distances around a rectangle, see the EdgeInsets class.

See also:

  • WidgetsBindingObserver, for a widgets layer mechanism to receive notifications when the padding changes.
  • MediaQuery.of, for the preferred mechanism for accessing these values.
  • Scaffold, which automatically applies the padding in material design applications.

Properties

bottom double
The distance from the bottom edge to the first unpadded pixel, in physical pixels.
final
hashCode int
The hash code for this object.
read-onlyinherited
left double
The distance from the left edge to the first unpadded pixel, in physical pixels.
final
The distance from the right edge to the first unpadded pixel, in physical pixels.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
top double
The distance from the top edge to the first unpadded pixel, in physical pixels.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

zero → const WindowPadding
A window padding that has zeros for each edge.
WindowPadding._(left: 0.0, top: 0.0, right: 0.0, bottom: 0.0)