Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

background container image flutter

class BaseLayout extends StatelessWidget{
  @override
  Widget build(BuildContext context){
    return Scaffold(
      body: Container(
        decoration: BoxDecoration(
          image: DecorationImage(
            image: AssetImage("assets/images/bulb.jpg"),
            fit: BoxFit.cover,
          ),
        ),
        child: null /* add child content here */,
      ),
    );
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #background #container #image #flutter
ADD COMMENT
Topic
Name
9+1 =