import 'package:flutter/material.dart'; import '../../globals.dart'; class ReflexBox extends StatefulWidget { final Widget child; final Color? color; const ReflexBox({Key? key, this.color, required this.child}) : super(key: key); @override _ReflexBoxState createState() => _ReflexBoxState(); } class _ReflexBoxState extends State { @override Widget build(BuildContext context) { return Material( clipBehavior: Clip.antiAlias, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(5.0))), //backgrround color: widget.color ?? Globals.RP_BG_DARK_COLOR, child: widget.child); } }