Closed liyao20190808 closed 3 years ago
I'm having the same problem. Is there a solution to this?
Using a 'Center' widget wrap your widget like this :
Center( child: Material( color: Colors.transparent, child: Container( width: 200, height: 200, child: ChildWidget() ) );
When i wrap my widget with a Container, set width or height is not working,the dialog is always fullscreen
showAnimatedDialog( context: context, barrierDismissible: true, builder: (BuildContext context) { return Container( padding: EdgeInsets.all(10.0), width: 200.0, child: FlutterLogo( size: 150.0, ), ); }, animationType: DialogTransitionType.size, curve: Curves.linear, );