Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter use NetworkImage as background

is there some way for using NetworkImage as background ?

I need create some box with network image and I need add some widgets over this image.

Thanks for help.

like image 904
Petr Klein Avatar asked Dec 17 '22 22:12

Petr Klein


1 Answers

Use the decoration attribute of Container to put the network image. You must also update the container size.

Container(
    decoration: 
         BoxDecoration(
             image: DecorationImage(
                        image: NetworkImage("http://via.placeholder.com/350x150"))))
like image 176
Zroq Avatar answered Jan 06 '23 14:01

Zroq