height method
Sets the height of this widget using a SizeUnit.
The height can be specified as a fixed pixel value, percentage of parent, viewport-relative size, or other SizeUnit types.
The optional key parameter assigns a key to the wrapped widget.
Example:
Text('Fixed').height(50.size),
Text('Relative').height(0.3.relativeSize),
Implementation
Widget height(SizeUnit height, [Key? key]) {
return _WidgetWrapper._wrapOrCopyWith(
child: this,
key: key != null ? () => key : null,
height: () => height,
);
}