12345678910111213141516171819202122232425262728293031323334 |
- import 'package:flutter/material.dart';
- import 'package:vitalapp/consts/styles.dart';
- class VPanel extends StatelessWidget {
- static const _borderRadius = GlobalStyles.borderRadiusValue;
- final Widget child;
- final Color? backgroundColor;
- final EdgeInsetsGeometry? padding;
- const VPanel({
- super.key,
- required this.child,
- this.backgroundColor,
- this.padding,
- });
- @override
- Widget build(BuildContext context) {
- return Container(
- // height: 150,
- padding:
- padding ?? const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- color: backgroundColor ?? Colors.white,
- borderRadius: const BorderRadius.all(_borderRadius),
- ),
- child: child,
- );
- }
- }
|