<p>You can do this by using DecoratedBox Widget. The example code below.</p> <p>Note: You can observe that Child of DecoratedBox doesn't have any code. If you are trying this example, you need to add image to your project and also add some widgets to Child within DecoaratedBox.</p> <p>import 'package:flutter/material.dart';</p> <p>void main() => runApp(BackgroundScreen());</p> <p>class BackgroundScreen extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Backgroun Image', home: Scaffold( body: DecoratedBox( position: DecorationPosition.background, decoration: BoxDecoration( color: Colors.red, image: DecorationImage( image: AssetImage('Images/Landscape.jpg'), fit: BoxFit.cover), ), child: //Rest of the widgets go here.. ) ), ); } }</p> <p>Thanks, Srikanth</p>
How to add a Background Images to the Screen?
This Article is posted by seven.srikanth at 12/25/2018 9:09:20 PM
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter
Tags: How to add a Background Images to the Screen?
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter