getFinalAlignment function
Implementation
Alignment getFinalAlignment({
required String horizontalAlignment,
required String verticalAlignment,
required String width,
required String height,
String? id,
}) {
if (id != null && id.contains("container")) {
return alignmentMap[verticalAlignment]?[horizontalAlignment] ??
Alignment.center;
}
Map<String, Map<String, dynamic>> sizeMap = {
'fullWidth': {
'fullHeight': Alignment.center,
'hugContent':
alignmentMap[verticalAlignment]?["center"] ?? Alignment.center,
},
'hugContent': {
'fullHeight':
alignmentMap["center"]?[horizontalAlignment] ?? Alignment.center,
'hugContent': alignmentMap[verticalAlignment]?[horizontalAlignment] ??
Alignment.center,
},
};
return sizeMap[width]?[height] ?? Alignment.center;
}