I am doing a widget that appears on the home screen and I don’t understand why the text under the circle avatar is soo down and far . I want it under it but not this far … any idea what I should change? the outcome photo is this I changed the padding but it doesn’t effect the interior of the widget
child: Stack(
children: [
Padding(
padding: const EdgeInsets.all(20.0),
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(30.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3),
)
]),
child: SizedBox(
height: MediaQuery.of(context).size.height / 2.2,
width: MediaQuery.of(context).size.width / 1.1,
child: Column(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(20.0),
child: Padding(
padding: const EdgeInsets.only(top: 20.0),
child: CircleAvatar(
radius: 50,
backgroundImage: ((snaps.data?.data()
as Map)['avatarUrl'] ==
'default')
? const NetworkImage(
"https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png"
// activity.imageUrl,
)
: NetworkImage((snaps.data?.data()
as Map)['avatarUrl']),
),
),
),
Container(
height: 170.0,
// width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20.0),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(
5.0, 50.0, 5.0, 5.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
SizedBox(
width: MediaQuery.of(context)
.size
.width *
0.5,
child: SizedBox(
width: 120.0,
child: Center(
child: Text(
(snaps.data?.data()
as Map)['name'],
// activity.name,
style: const TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w600,
),
overflow:
TextOverflow.ellipsis,
maxLines: 2,
),
),
),
),
SizedBox(
width: MediaQuery.of(context)
.size
.width *
0.5,
child: SizedBox(
width: 120.0,
child: Center(
child: Text(
(snaps.data?.data()
as Map)['address'],
// activity.name,
style: const TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w600,
),
overflow:
TextOverflow.ellipsis,
maxLines: 2,
),
),
),
),
Text(
(snapshot2.data?.data()
as Map)['category'],
// activity.type,
style: const TextStyle(
color: Colors.grey,
),
),
],
),
),
),
],
),
),
),
),
Positioned(
right: 35,
child: TextButton(
style: TextButton.styleFrom(
shape: const StadiumBorder(),
backgroundColor: Colors.purple,
disabledBackgroundColor: Colors.black,
),
onPressed: null,
child: Text(
'????TOP 5',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
),
)
],
),