         scrollView.alwaysBounceHorizontal = false
         scrollView.translatesAutoresizingMaskIntoConstraints = false
         scrollView.delegate = self
-        if layoutDirection == .rightToLeft {
-            scrollView.transform = CGAffineTransform(scaleX: -1, y: 1)
-        }
+        scrollView.flipIfNeeded(for: layoutDirection)
         updateScrollViewInsets()
     }
 

            return isHidden
        }
    }
}

        scrollableStackView.alignment = .center
        scrollableStackView.distribution = .equalSpacing
        scrollableStackView.translatesAutoresizingMaskIntoConstraints = false
        scrollableStackView.flipIfNeeded(for: layoutDirection)
    }


