MSizedBox class

A fixed-size box, optionally wrapping child.

With no child it is blank space — the usual way to put a precise gap between two nodes, where MSpacer would instead absorb whatever room is left. With a child it constrains that child to the given size.

A null width or height leaves that axis to size itself.

Inheritance

Constructors

MSizedBox({double? width, double? height, MNode? child})
const
MSizedBox.height(double height)
A fixed vertical gap — the common case inside an MColumn.
const
MSizedBox.square(double size, {MNode? child})
A square box of size on both axes.
const
MSizedBox.width(double width)
A fixed horizontal gap — the common case inside an MRow.
const

Properties

child MNode?
final
hashCode int
The hash code for this object.
no setterinherited
height double?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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