setSize method

  1. @override
void setSize({
  1. required double width,
  2. required double height,
})
override

Set size of area items are need to place in

Implementation

@override
void setSize({required double width, required double height}) {
  assert(width > 0, 'width has to be more then zero');
  assert(height > 0, 'height has to be more then zero');

  switch (layoutDirection) {
    case LayoutDirection.horizontal:
      _width = width;
      _height = height;
      break;
    case LayoutDirection.vertical:
      _width = height;
      _height = width;
      break;
  }
}