padding property
The amount of space by which to inset the scrollbar's start and end, as well as its side to the nearest edge, in logical pixels.
This is typically set to the current MediaQueryData.padding to avoid partial obstructions such as display notches. If you only want additional margins around the scrollbar, see mainAxisMargin.
Defaults to EdgeInsets.zero. Offsets from all four directions must be greater than or equal to zero.
For RTL (right-to-left) support, you can provide EdgeInsetsDirectional, but you must also provide a non-null textDirection to properly resolve the padding values. The scrollbar will automatically adjust the padding based on the text direction.
Implementation
EdgeInsetsGeometry get padding => _padding;
Implementation
set padding(EdgeInsetsGeometry value) {
if (padding == value) {
return;
}
_padding = value;
_resolvedPadding = _padding.resolve(_textDirection);
notifyListeners();
}