toJson method
Implementation
Map<String, Object?> toJson() {
return <String, Object?>{
'didScroll': didScroll,
'strategy': strategy,
if (scrollableKey != null) 'scrollableKey': scrollableKey,
if (scrollablePath != null) 'scrollablePath': scrollablePath,
if (scrollableTypeName != null) 'scrollableTypeName': scrollableTypeName,
if (scrollableCandidateIndex != null)
'scrollableCandidateIndex': scrollableCandidateIndex,
if (scrollableCandidateCount != null)
'scrollableCandidateCount': scrollableCandidateCount,
if (pixelsBefore != null) 'pixelsBefore': pixelsBefore,
if (pixelsAfter != null) 'pixelsAfter': pixelsAfter,
if (nextPixels != null) 'nextPixels': nextPixels,
if (minScrollExtent != null) 'minScrollExtent': minScrollExtent,
if (maxScrollExtent != null) 'maxScrollExtent': maxScrollExtent,
if (viewportDimension != null) 'viewportDimension': viewportDimension,
if (acceptsUserOffset != null) 'acceptsUserOffset': acceptsUserOffset,
if (allowsProgrammaticScroll != null)
'allowsProgrammaticScroll': allowsProgrammaticScroll,
'hadGestureTarget': hadGestureTarget,
'hadSemanticAction': hadSemanticAction,
'matchedRegistryTarget': matchedRegistryTarget,
if (targetVisibilityObserved) 'targetVisibilityObserved': true,
if (targetMounted) 'targetMounted': true,
if (targetVisible) 'targetVisible': true,
};
}