getPreferredSize method

Size? getPreferredSize(
  1. Size screenSize
)

Returns Size calculated from the configuration.

Implementation

Size? getPreferredSize(Size screenSize) {
  if ((width != null || widthFraction != null) &&
      (height != null || heightFraction != null)) {
    return Size(
      width ?? widthFraction! * screenSize.width,
      height ?? heightFraction! * screenSize.height,
    );
  }
  return null;
}