Step 1 / 5
Later children paint on top
A Stack layers its children: the first is at the back, the last at the front. Here the photo is the background.
Overlap widgets, pin them to edges and corners, and control clipping.
1Stack(2 clipBehavior: Clip.hardEdge,3 children: [4 Image.network(photoUrl, fit: BoxFit.cover),5 Positioned(6 left: 16,7 bottom: 16,8 child: Text('Sunset', style: titleStyle),9 ),10 const Align(11 alignment: Alignment.topRight,12 child: Icon(Icons.favorite),13 ),14 ],15)
Stack(children: [Red, Green, Blue])A Stack layers its children: the first is at the back, the last at the front. Here the photo is the background.