encodeScrollbarThemeData static method
Encodes the given ScrollbarThemeData to the JSON representation. This produces the following structure:
{
"crossAxisMargin": <double>,
"isAlwaysShown": <bool>,
"mainAxisMargin": <double>,
"minThumbLength": <double>,
"radius": <Radius>,
"showTrackOnHover": <bool>
"thickness": <double>
}
See also:
Implementation
static Map<String, dynamic>? encodeScrollbarThemeData(
ScrollbarThemeData? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = {
'crossAxisMargin': value.crossAxisMargin,
'isAlwaysShown': value.isAlwaysShown,
'mainAxisMargin': value.mainAxisMargin,
'minThumbLength': value.minThumbLength,
'radius': encodeRadius(value.radius),
'showTrackOnHover': value.showTrackOnHover,
'thickness': encodeMaterialStatePropertyDouble(
value.thickness,
),
};
}
return _stripNull(result);
}