onSize method

void onSize(
  1. Size newSize
)

Implementation

void onSize(Size newSize) {
  if (size == newSize) return;

  if (newSize.isEmpty) {
    size = null;
  } else {
    size = newSize;
  }

  if (!mounted) return;
  setState(() {});
}