alignment method
Aligns this widget within the available space.
Implementation
@widgetFactory
Widget alignment({
double? start,
double? x,
double? y,
AlignmentGeometry? alignment,
double? widthFactor,
double? heightFactor,
}) {
assert(() {
_debugCheckParameterCombinations(modifier: 'alignment', [
{'start': start},
{'x': x},
]);
_debugCheckParameterCombinations(modifier: 'alignment', [
{'start': start, 'x': x, 'y': y},
{'alignment': alignment},
]);
return true;
}());
if (alignment == null) {
if (start != null) {
alignment = AlignmentDirectional(start, y ?? 0);
} else {
alignment = Alignment(x ?? 0, y ?? 0);
}
}
return FleetAlign(
alignment: alignment,
widthFactor: widthFactor,
heightFactor: heightFactor,
child: this,
);
}