getMargin function
Implementation
double getMargin(AnchorMargin margin, double distance) {
if (margin == AnchorMargin.none) return 0;
return margin == AnchorMargin.start ? -distance : distance;
}
double getMargin(AnchorMargin margin, double distance) {
if (margin == AnchorMargin.none) return 0;
return margin == AnchorMargin.start ? -distance : distance;
}