123456789101112131415161718192021222324252627282930313233 |
- import 'package:flutter/material.dart';
- class VPanel extends StatelessWidget {
- static const _borderRadius = Radius.circular(8);
- 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,
- );
- }
- }
|