limited method

Widget limited({
  1. required double maxWidth,
  2. required double maxHeight,
  3. Key? key,
})

A box that limits its size only when it's unconstrained.

Implementation

Widget limited({
  required double maxWidth,
  required double maxHeight,
  Key? key,
}) {
  return LimitedBox(
    key: key,
    maxWidth: maxWidth,
    maxHeight: maxHeight,
    child: this,
  );
}