SliverVisibility.maintain constructor
Control whether the given sliver is visible.
This is equivalent to the default SliverVisibility constructor with all
"maintain" fields set to true. This constructor should be used in place of
a SliverOpacity widget that only takes on values of 0.0
or 1.0
, as it
avoids extra compositing when fully opaque.
Implementation
const SliverVisibility.maintain({
super.key,
required this.sliver,
this.replacementSliver = const SliverToBoxAdapter(),
this.visible = true,
}) : maintainState = true,
maintainAnimation = true,
maintainSize = true,
maintainSemantics = true,
maintainInteractivity = true;