addVerticalSpace method

Widget addVerticalSpace(
  1. double height
)

Creates a vertical spacing widget with responsive height.

The height parameter is multiplied by the screen height from GetX to create responsive vertical spacing that adapts to different screen sizes.

Parameters:

  • height: A fractional value (0.0 to 1.0) representing the proportion of screen height.

Returns a SizedBox with the calculated height.

Example:

// Add 2% of screen height as spacing
RtCommonWidget.instance.addVerticalSpace(0.02);

Implementation

Widget addVerticalSpace(double height) {
  return SizedBox(
    height: Get.height * height,
  );
}