Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter container background image from asset

@override
Widget build(BuildContext context) {
  return DecoratedBox(
    decoration: BoxDecoration(
      image: DecorationImage(image: AssetImage("your_asset"), fit: BoxFit.cover),
    ),
    child: Center(child: FlutterLogo(size: 300)),
  );
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #container #background #image #asset
ADD COMMENT
Topic
Name
9+2 =