Complete the code to create a Stack widget.
Stack(children: [ Container(width: 100, height: 100, color: Colors.blue), [1](left: 10, top: 10, child: Icon(Icons.star, color: Colors.white)) ])
The Positioned widget is used inside a Stack to place a child at a specific position.
Complete the code to position a red square 20 pixels from the bottom and right inside a Stack.
Stack(children: [ Container(width: 150, height: 150, color: Colors.grey), [1](bottom: 20, right: 20, child: Container(width: 50, height: 50, color: Colors.red)) ])
Positioned is used to place the red square 20 pixels from the bottom and right edges inside the Stack.
Fix the error in the code to correctly position the text inside the Stack.
Stack(children: [ Container(width: 200, height: 200, color: Colors.yellow), Positioned(left: 30, top: 30, child: [1]('Hello')) ])
The child property expects a widget instance. Text is a widget class, so it should be called with parentheses outside the Positioned widget, not inside the child property as a string.
Fill both blanks to create a Stack with a blue box and a green box positioned 15 pixels from the top and left.
Stack(children: [ Container(width: 120, height: 120, color: [1]), Positioned(top: 15, left: 15, child: Container(width: 60, height: 60, color: [2])) ])
The first container is blue, and the positioned container is green as specified.
Fill all three blanks to create a Stack with a yellow background, a centered icon, and a positioned text 10 pixels from the bottom and right.
Stack(children: [ Container(color: [1]), Center(child: Icon(Icons.favorite, color: [2])), Positioned(bottom: 10, right: 10, child: Text([3])) ])
The background container is yellow, the icon is red, and the positioned text shows 'Love'.