splitIntoTwoPanes method

List<PaneList> splitIntoTwoPanes({
  1. required String paneIdA,
  2. required String paneIdB,
  3. required double width,
  4. required double height,
  5. required Axis axis,
  6. String? cellIdA,
  7. String? cellIdB,
})

Implementation

List<PaneList> splitIntoTwoPanes({
  required String paneIdA,
  required String paneIdB,
  required double width,
  required double height,
  required Axis axis,
  String? cellIdA,
  String? cellIdB,
}) {
  return <PaneList>[
    SinglePaneList(
      paneIdA,
      id: cellIdA,
      width: axis == Axis.horizontal ? width / 2 : width,
      height: axis == Axis.horizontal ? height : height / 2,
    ),
    SinglePaneList(
      paneIdB,
      id: cellIdB,
      width: axis == Axis.horizontal ? width / 2 : width,
      height: axis == Axis.horizontal ? height : height / 2,
    )
  ];
}