cPreferSize method

PreferredSizeWidget cPreferSize(
  1. double h
)

Create a widget with a preferred size.

h specifies the preferred height of the widget.

This extension wraps the widget with a PreferredSize widget, allowing you to set a preferred height for it.

Implementation

PreferredSizeWidget cPreferSize(double h) => PreferredSize(
      child: this,
      preferredSize: Size.fromHeight(h),
    );