paddingTop method

Padding paddingTop(
  1. double top
)

Applies padding to the top side only.

Adds spacing to the top side while leaving other sides unchanged. Useful for creating top margins or spacing from headers.

Parameters:

  • top: The amount of padding to apply to the top side.

Returns a Padding widget with top-side padding only.

Example:

Text('Content with top spacing').paddingTop(20);

Implementation

Padding paddingTop(double top) => paddingOnly(top: top);