diff --git a/Sources/Flow/Internal/Layout.swift b/Sources/Flow/Internal/Layout.swift index 0bfe32e4..24b7abba 100644 --- a/Sources/Flow/Internal/Layout.swift +++ b/Sources/Flow/Internal/Layout.swift @@ -136,7 +136,7 @@ struct FlowLayout { let breakpoints = lineBreaker.wrapItemsToLines( sizes: sizes.map(\.breadth), spacings: spacings, - in: proposedSize.replacingUnspecifiedDimensions().value(on: axis) + in: proposedSize.replacingUnspecifiedDimensions(by: .infinity).value(on: axis) ) var lines: Lines = [] diff --git a/Sources/Flow/Internal/Size.swift b/Sources/Flow/Internal/Size.swift index b500e2ab..08a6f8a7 100644 --- a/Sources/Flow/Internal/Size.swift +++ b/Sources/Flow/Internal/Size.swift @@ -94,6 +94,13 @@ extension CGSize: FixedOrientation2DCoordinate { case .vertical: height } } + + static var infinity: CGSize { + CGSize( + width: CGFloat.infinity, + height: CGFloat.infinity + ) + } } @available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *)