i ma trying to display an image in my flutter app without changing its properties. Given that i have images where some have longer width than height and vice versa. i have tried not using height and width properties but it still gets to affect some images .
Here is my code
child: Column(
children: <Widget>[
Stack(
alignment: Alignment.bottomCenter,
children: <Widget>[
Image.network(
widget.post.imageUrls[0],
height: MediaQuery.of(context).size.height*0.3,
fit: BoxFit.cover,
),
Container(
width: screenWidth(context)*0.2,
padding: EdgeInsets.all(5),
decoration: BoxDecoration(
borderRadius:BorderRadius.circular(10),
color:Color.fromRGBO(0, 0, 0, 0.4),
),
child: CountDownTimer(
secondsRemaining: secs,
whenTimeExpires: () {
setState(() {
hasTimerStopped = true;
});
},
countDownTimerStyle: TextStyle(
color: Colors.redAccent,
fontSize: 14.0,
),
),
),
]
),
...other elements in my column below ...
What widget can i use to display these images safely.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…