Shoutout to @Joseinnewworld for sliding in and grabbing 9 more #NFTs like it’s nothing 🔥 Always showing up, always raising the bar. Appreciate you, legend! #eCash $XEC #nftcollectors #CryptoMarket #Crypto pic.twitter.com/T0XBBCjd3g
— NFToa (@nftoa_) November 25, 2025
My image cannot be resized. First, I added a background image to a container widget. Then, I placed the logo image in the center widget using Image.asset. The main issue is that the image size is being resized according to its height and width. Currently, I am coding in the Flutter framework using the Dart language.
I am coding in Android Studio.
@override
Widget build(BuildContext context) {
return new MaterialApp(
debugShowCheckedModeBanner: false,
home: new Scaffold(
body: new Stack(
children: <Widget>[
new Container(
decoration: new BoxDecoration(
image: new DecorationImage(
image: new AssetImage("assets/imgs/home_bg.png"),
fit: BoxFit.cover,
),
),
),
new Center(
child: Image.asset(
"assets/imgs/home_logo.png",
height: 300,
width: 300,
),
),
],
),
),
);
}
There are no error messages displayed, yet the image is not resized.
Solution
Wrap the image widget with an Expanded widget so that the width and height settings work properly.
Expanded(
child: Image.asset(
"assets/imgs/home_logo.png",
height: 300,
width: 300,
),
),
