Add Image In Box Decoration Flutter Code Example


Example 1: how to add image from assets inside as a decoration image in container

new Container(   width: 100.00,   height: 100.00,   decoration: new BoxDecoration(   image: new DecorationImage(       image: ExactAssetImage('assets/example.png'),       fit: BoxFit.fitHeight,       ),   ));

Example 2: how to add image from assets inside as a decoration image in container

Container(       height: 120.0,       width: 120.0,       decoration: BoxDecoration(         image: DecorationImage(           image: AssetImage(               'assets/assets/alucard.jpg'),           fit: BoxFit.fill,         ),         shape: BoxShape.circle,       ),     )

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable