DVBox<T>.twoPane constructor
const
DVBox<T>.twoPane (
- List<
Widget> children, { - DVModifier? modifier,
- double spacing = 16,
Two panes, one each side of the fold on a foldable.
Across a book-style hinge the first pane takes the left side and the second the right; across a fold the phone lies open on a table, the first pane is on top. Nothing is laid out in a hinge that covers pixels. With no fold the panes sit side by side from a tablet up, and stack on a phone so neither is lost. Each pane sees a screen with no fold in it, so a two-pane box inside a pane does not split again.
The fold is where MediaQuery reports it, which is window space: put the box at the top of a page, as Flutter's own DisplayFeatureSubScreen expects too.
Implementation
const DVBox.twoPane(
List<Widget> children, {
DVModifier? modifier,
double spacing = 16,
}) : _child = null,
_children = children,
_modifier = modifier,
_layout = _DVBoxLayout.twoPane,
_align = DVAlign.start,
_crossAlign = DVCrossAlign.stretch,
_columns = 2,
_responsive = true,
_spacing = spacing,
_scrollable = false,
_items = null,
_itemBuilder = null,
_oneFold = DVThreePaneFold.firstAlone;