init
This commit is contained in:
26
lib/shared/widgets/safe_area_wrapper.dart
Normal file
26
lib/shared/widgets/safe_area_wrapper.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
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),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user