positioned method
指定控件的位置, 适用于Stack >>>
Implementation
Positioned positioned(
{double? left,
double? right,
double? top,
double? bottom,
double? width,
double? height,
double? all,
double? horizon,
double? vertical}) {
if (all != null) {
return Positioned(
child: this,
left: all,
right: all,
top: all,
bottom: all,
);
}
double? _left = horizon ?? left;
double? _right = horizon ?? right;
double? _top = horizon ?? top;
double? _bottom = horizon ?? bottom;
return Positioned(
child: this,
left: _left,
right: _right,
top: _top,
bottom: _bottom,
width: width,
height: height,
);
}