supportingTextPadding property
The padding around the supporting text row, which contains the helper text, the error text, and the counter.
The start and end values set the horizontal position of the row, the same way InputDecoration.contentPadding does for the input. The top value is the gap between the bottom of the decoration's container and the row, and the bottom value is the space below the row.
If null, the row uses these defaults:
- start and end: the start and end values of InputDecoration.contentPadding.
- top: 4.0 for Material 3, 8.0 for Material 2.
- bottom: 0.0.
If non-null, every side of this value is used as is, including sides
that are zero. For example, EdgeInsetsDirectional.only(start: 24.0)
sets the top gap to zero, so the supporting text sits directly against
the container. To change the horizontal padding while keeping the
default Material 3 gap, set the top value explicitly:
const InputDecoration(
helperText: 'Helper text',
supportingTextPadding: EdgeInsetsDirectional.fromSTEB(24.0, 4.0, 24.0, 0.0),
)
If both this and InputDecorationThemeData.supportingTextPadding are non-null, this value replaces the theme value entirely. The two are not merged side by side.
Implementation
final EdgeInsetsGeometry? supportingTextPadding;