Updated widget
This commit is contained in:
parent
9ef7e5ffe3
commit
c3914325cf
1 changed files with 12 additions and 3 deletions
|
|
@ -4,20 +4,29 @@ class BoxWidget extends StatelessWidget {
|
|||
final Widget content;
|
||||
final double? circular;
|
||||
final CrossAxisAlignment? alignment;
|
||||
final double? width;
|
||||
final EdgeInsets? padding;
|
||||
// final double? titleSize;
|
||||
|
||||
const BoxWidget({super.key, required this.content, this.circular = 8, this.alignment = CrossAxisAlignment.start});
|
||||
const BoxWidget({
|
||||
super.key,
|
||||
required this.content,
|
||||
this.circular = 8,
|
||||
this.alignment = CrossAxisAlignment.start,
|
||||
this.width,
|
||||
this.padding,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
padding: padding ?? EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(circular ?? 8),
|
||||
color: Color.fromRGBO(16, 22, 28, 0.584),
|
||||
border: Border.all(color: const Color.fromRGBO(41, 60, 78, 0.914)),
|
||||
),
|
||||
width: MediaQuery.of(context).size.width - 30,
|
||||
width: width ?? MediaQuery.of(context).size.width - 30,
|
||||
child: Column(
|
||||
crossAxisAlignment: alignment ?? CrossAxisAlignment.start,
|
||||
children: [Padding(padding: const EdgeInsets.all(16), child: content)],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue