I know how to align Widgets with Stack properly but I'm done using Stack because sometimes it gives me lots of headache when things become too messy. I would like to ask for that is there a way to stack widgets without using Stack? It is like Transform.translate can do the same thing but is there a more reliable way to do that?
Container(
height: 70.0,
width: 70.0,
decoration: BoxDecoration(
gradient: bgDarkColorGradient,
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
offset: Offset(0, 12),
blurRadius: 24.0,
spreadRadius: 0.0,
color: Color.fromARGB(0, 0, 0, 130),
),
],
),
child: Stack(
children: [
Positioned(
child: Align(
alignment: Alignment.center,
child: Icon(
Icons.person_outline_outlined,
color: Colors.white,
),
),
),
Positioned(
top: 35,
right: 0,
child: Align(
alignment: Alignment.bottomRight,
child: Container(
height: 32.0,
width: 32.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
border: Border.all(
width: 4.0,
color: Color.fromARGB(255, 77, 93, 144),
),
),
child: Icon(Icons.edit, size: 12.0),
),
),
),
],
),
),
With this code, I almost achieved this output.
Lastly, my question is that is there a way to get these kind of results without using Stack?
question from:
https://stackoverflow.com/questions/65829398/align-widgets-without-stack-in-flutter