Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save victorfrankenstein245/b4581a5812c4be334d9ce959b11d36c5 to your computer and use it in GitHub Desktop.
Save victorfrankenstein245/b4581a5812c4be334d9ce959b11d36c5 to your computer and use it in GitHub Desktop.
Flutter Container background image
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 */,
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment