ConditionalWrapper constructor

const ConditionalWrapper({
  1. Key? key,
  2. required Widget child,
  3. required bool condition,
  4. required Widget wrapper(
    1. BuildContext context,
    2. Widget child
    ),
})

A widget that conditionally wraps its child with a wrapper widget. If condition is false, just the child will be returned.

Implementation

const ConditionalWrapper({super.key, required this.child, required this.condition, required this.wrapper});