import 'package:flutter/material.dart';

class SafeAreaWrapper extends StatelessWidget {
  const SafeAreaWrapper({
    super.key,
    required this.child,
    this.backgroundColor,
    this.top = true,
    this.bottom = true,
    this.minimum = EdgeInsets.zero,
  });

  final Widget child;
  final Color? backgroundColor;
  final bool top;
  final bool bottom;
  final EdgeInsets minimum;

  @override
  Widget build(BuildContext context) {
    return ColoredBox(
      color: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
      child: SafeArea(top: top, bottom: bottom, minimum: minimum, child: child),
    );
  }
}
