TwoPane is fold and hinges aware using the provided the displayFeatures (which should normally be calculated via calculateDisplayFeatures). The layout will be adapted to properly separate first and second panes so they don't interfere with hardware hinges (vertical or horizontal) as specified in displayFeatures, or respect folds when needed (for example, when foldable is half-folded (90-degree fold AKA tabletop) the split will become on the bend).
To only be aware of folds with a specific orientation, pass in an alternate foldAwareConfiguration to only adjust for vertical or horizontal folds.
The TwoPane layout will always place both first and second, based on the provided strategy and window environment. If you instead only want to place one or the other, that should be controlled at a higher level and not calling TwoPane if placing both is not desired.
strategy of the two pane that controls the arrangement of the layout
the list of known display features to automatically avoid
the types of display features to automatically avoid
an optional modifier for the layout