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 Widget content;
|
||||||
final double? circular;
|
final double? circular;
|
||||||
final CrossAxisAlignment? alignment;
|
final CrossAxisAlignment? alignment;
|
||||||
|
final double? width;
|
||||||
|
final EdgeInsets? padding;
|
||||||
// final double? titleSize;
|
// 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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.all(16),
|
padding: padding ?? EdgeInsets.all(16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(circular ?? 8),
|
borderRadius: BorderRadius.circular(circular ?? 8),
|
||||||
color: Color.fromRGBO(16, 22, 28, 0.584),
|
color: Color.fromRGBO(16, 22, 28, 0.584),
|
||||||
border: Border.all(color: const Color.fromRGBO(41, 60, 78, 0.914)),
|
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(
|
child: Column(
|
||||||
crossAxisAlignment: alignment ?? CrossAxisAlignment.start,
|
crossAxisAlignment: alignment ?? CrossAxisAlignment.start,
|
||||||
children: [Padding(padding: const EdgeInsets.all(16), child: content)],
|
children: [Padding(padding: const EdgeInsets.all(16), child: content)],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue