getFinalAlignment function
Implementation
Alignment getFinalAlignment(
{required String horizontalAlignment,
required String verticalAlignment,
required String width,
required String height}) {
Map<String, Map<String, dynamic>> sizeMap = {
'fullWidth': {
'fullHeight': Alignment.center,
'hugContent':
alignmentMap[verticalAlignment]?["center"] ?? Alignment.center,
'fixed': alignmentMap[verticalAlignment]?["center"] ?? Alignment.center,
},
'hugContent': {
'fullHeight':
alignmentMap["center"]?[horizontalAlignment] ?? Alignment.center,
'hugContent': alignmentMap[verticalAlignment]?[horizontalAlignment] ??
Alignment.center,
'fixed': alignmentMap[verticalAlignment]?[horizontalAlignment] ??
Alignment.center,
},
'fixed': {
'fullHeight':
alignmentMap["center"]?[horizontalAlignment] ?? Alignment.center,
'hugContent': alignmentMap[verticalAlignment]?[horizontalAlignment] ??
Alignment.center,
'fixed': alignmentMap[verticalAlignment]?[horizontalAlignment] ??
Alignment.center,
},
};
// print(sizeMap[width]?[height]);
return sizeMap[width]?[height] ?? Alignment.center;
}