2022-11-14 15:36:34 -07:00
|
|
|
import 'package:wonders/common_libs.dart';
|
|
|
|
|
|
|
|
class CenteredBox extends StatelessWidget {
|
2024-02-20 13:56:39 -08:00
|
|
|
const CenteredBox({super.key, required this.child, this.width, this.height, this.padding});
|
2022-11-14 15:36:34 -07:00
|
|
|
final Widget child;
|
|
|
|
final double? width;
|
|
|
|
final double? height;
|
|
|
|
final EdgeInsets? padding;
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) => Padding(
|
|
|
|
padding: padding ?? EdgeInsets.zero,
|
|
|
|
child: Center(
|
|
|
|
child: SizedBox(
|
|
|
|
width: width,
|
|
|
|
height: height,
|
|
|
|
child: child,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|