import 'package:flutter/material.dart';

class ConditionalWrapper extends StatelessWidget {
  final bool condition;
  final Widget child;
  final Widget Function(Widget child) wrapper;

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

  @override
  Widget build(BuildContext context) => condition ? wrapper(child) : child;
}
