forked from eatvio/eatvio_app
39 lines
1.1 KiB
Dart
39 lines
1.1 KiB
Dart
import 'package:eatvio_app/theme/theme_helper.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class MainBackgroundBouble extends StatelessWidget {
|
|
const MainBackgroundBouble(
|
|
{super.key, required this.child, this.width, this.padding, this.enableShadow = false,});
|
|
final double? width;
|
|
final Widget child;
|
|
final bool enableShadow;
|
|
final EdgeInsetsGeometry? padding;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
boxShadow: enableShadow
|
|
? [
|
|
BoxShadow(
|
|
color: Color(0x00000000).withOpacity(0.2),
|
|
spreadRadius: 0,
|
|
blurRadius: 32,
|
|
offset: Offset(0, 0),
|
|
),
|
|
]
|
|
: null,),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(12),
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: appTheme.whiteA700,
|
|
),
|
|
width: width ?? MediaQuery.sizeOf(context).width,
|
|
padding: padding,
|
|
child: child,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|