getAlignment method
Implementation
AlignmentGeometry getAlignment(
String? alignment, {
AlignmentGeometry? defaultValue,
}) {
switch (alignment) {
case 'left':
case 'centerLeft':
return Alignment.centerLeft;
case 'right':
case 'centerRight':
return Alignment.centerRight;
case 'topLeft':
return Alignment.topLeft;
case 'topRight':
return Alignment.topRight;
case 'bottomLeft':
return Alignment.bottomLeft;
case 'bottomRight':
return Alignment.bottomRight;
case 'bottomCenter':
return Alignment.bottomCenter;
case 'topCenter':
return Alignment.topCenter;
case 'center':
return Alignment.center;
default:
return defaultValue ?? Alignment.center;
}
}