SliverVisibilityModifier constructor

const SliverVisibilityModifier({
  1. Key? key,
  2. Widget? sliver,
  3. Key? modifierKey,
  4. Widget replacementSliver = const SliverToBoxAdapter(),
  5. bool visible = true,
  6. bool maintainState = false,
  7. bool maintainAnimation = false,
  8. bool maintainSize = false,
  9. bool maintainSemantics = false,
  10. bool maintainInteractivity = false,
})

Control whether the given sliver is visible.

The sliver and replacementSliver arguments must not be null.

The boolean arguments must not be null.

The maintainSemantics and maintainInteractivity arguments can only be set if maintainSize is set.

The maintainSize argument can only be set if maintainAnimation is set.

The maintainAnimation argument can only be set if maintainState is set.

Implementation

const SliverVisibilityModifier({
  super.key,
  Widget? sliver,
  super.modifierKey,
  this.replacementSliver = const SliverToBoxAdapter(),
  this.visible = true,
  this.maintainState = false,
  this.maintainAnimation = false,
  this.maintainSize = false,
  this.maintainSemantics = false,
  this.maintainInteractivity = false,
}) : super(child: sliver);