import 'package:flutter/material.dart'; class DrifterDialog extends StatelessWidget { const DrifterDialog({ Key? key, this.child, this.maxWidth = 150, this.maxHeight = 150, }) : super(key: key); final Widget? child; final double maxWidth; final double maxHeight; @override Widget build(BuildContext context) { return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.end, children: [ ConstrainedBox( constraints: BoxConstraints( maxWidth: maxWidth, maxHeight: maxHeight, ), child: Material( color: Colors.transparent, borderRadius: BorderRadius.circular( 20, ), child: Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular( 20, ), ), child: child, ), ), ), ], ); } }