Reputation: 22906
There is a Row
. Inside that Row
there is a ListView
and an Image
.
I want to put the Image
in a Column
so that I can put a SizedBox
on the top of it to push it down.
I also have to align it to the bottom right side.
Problem is since I have put the Image
in the Column
---- now nothing is visible.
Row(
children: <Widget>[
Flexible(
child:
ListView.builder
(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
itemCount: bulletList[Index].length,
itemBuilder: (BuildContext ctxt, int Index)
{
return new ListView
(
shrinkWrap: true,
padding: const EdgeInsets.all(1),
children: <Widget>
[
ListTile(
leading: CircleAvatar(
radius: 6.0,
backgroundColor: Colors.black,
),
title : Text(bulletList[Index][Index], style: TextStyle(color: Colors.red, fontSize: 25,),)
),
]
);
},
),
),
Column(
children: <Widget>[
SizedBox( height: 2,),
Flexible(
child:
GestureDetector(
child: Image(
//alignment: Alignment.bottomRight,
image: NetworkImage('https://flutter.github.io/assets-for-api-docs/assets/widgets/owl.jpg'),
height: 15,
width: 15,
fit: BoxFit.cover,
),
),
),
],
),
],
),
Upvotes: 0
Views: 69
Reputation: 5608
Use Align
instead of Column
with SizedBox
and set its alignment
property to Alignment.bottomRight
:
Align(
alignment: Alignment.bottomRight,
child: GestureDetector(
child: Image(
image: NetworkImage(
'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl.jpg',
),
height: 15,
width: 15,
fit: BoxFit.cover,
),
),
),
Upvotes: 1