SplitPane constructor

SplitPane({
  1. Key? key,
  2. required Axis axis,
  3. required List<Widget> children,
  4. required List<double> initialFractions,
  5. List<double>? minSizes,
  6. List<PreferredSizeWidget>? splitters,
})

Builds a split oriented along axis.

Implementation

SplitPane({
  super.key,
  required this.axis,
  required this.children,
  required this.initialFractions,
  this.minSizes,
  this.splitters,
})  : assert(children.length >= 2),
      assert(initialFractions.length >= 2),
      assert(children.length == initialFractions.length) {
  _verifyFractionsSumTo1(initialFractions);
  if (minSizes != null) {
    assert(minSizes!.length == children.length);
  }
  if (splitters != null) {
    assert(splitters!.length == children.length - 1);
  }
}