doLayout method

  1. @override
void doLayout(
  1. Context context,
  2. TreeLayoutNode root,
  3. num width,
  4. num height,
)
override

Implementation

@override
void doLayout(Context context, TreeLayoutNode root, num width, num height) {
  Direction2 direction = this.direction;
  if (direction != Direction2.ltr && direction != Direction2.rtl && direction != Direction2.h) {
    direction = Direction2.ltr;
  }
  if (direction == Direction2.ltr || direction == Direction2.rtl) {
    _layoutTree(root, width, height, direction);
  } else {
    _layoutCenter(root, width, height);
  }

  onLayoutEnd();
}