sized method

Widget sized({
  1. double? width,
  2. double? height,
})

Implementation

Widget sized({double? width, double? height}) {
  if (this is SizedBox) {
    return SizedBox(
      width: width ?? (this as SizedBox).width,
      height: height ?? (this as SizedBox).height,
      child: (this as SizedBox).child,
    );
  }
  return SizedBox(
    width: width,
    height: height,
    child: this,
  );
}