I would like to overlay a Round view on top of a background View just like in this screenshot below.
Here's how you do it: Step 1: Wrap the Stack's child widget inside the Position widget. Step 2: Inside the Position widget, add the top , right , bottom , left property and give it a value. For example, setting top:15 and right:0 will position a widget on the top right of your screen with 15 px space from the top.
@override Widget build(BuildContext context) { // TODO: implement build return new Container( width: 150.0, height: 150.0, child: new Stack(children: <Widget>[ new Container( alignment: Alignment.center, color: Colors.redAccent, child: Text('Hello'), ), new Align(alignment: Alignment.bottomRight, child: FloatingActionButton( child: new Icon(Icons.add), onPressed: (){}), ) ], ), ); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With