Files
record-tool/lib/shared/widgets/safe_area_wrapper.dart
2026-06-03 14:07:10 +08:00

27 lines
634 B
Dart

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),
);
}
}