How to add a background image to flutter app

0 votes

Hi Guys,

I am new to Flutter App. I want to add one background image to my App. How can I do that?

Sep 10, 2020 in Others by akhtar
• 38,210 points
883 views

1 answer to this question.

0 votes

Hi@akhtar,

Scaffold doesn't support any concept of a background image. What you can do is give the Scaffold a transparent color and put it in a Container and use the decoration property to pull in the required background image. You can see the below code.

Container(
          decoration: BoxDecoration(
              image: DecorationImage(
                  image: AssetImage(
                     "images/background.jpg")
                      .image,
                  fit: BoxFit.cover))
)
answered Sep 10, 2020 by MD
• 95,300 points

Related Questions In Others

0 votes
1 answer

How to add a border to a widget in Flutter?

Hi@akhtar, You need to add the TextField as a child to a Container that has ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,300 points
1,175 views
0 votes
1 answer

How to create a navigation bar in Flutter app?

Hi@akhtar, To add a drawer to the app, ...READ MORE

answered Aug 25, 2020 in Others by MD
• 95,300 points
301 views
0 votes
1 answer

How to retrieve the value of a text field in Flutter App?

Hi@akhtar, In your TextField, you can call one ...READ MORE

answered Sep 3, 2020 in Others by MD
• 95,300 points
521 views
0 votes
1 answer

How to add Icon to the TextField in Flutter App?

Hi@akhtar, You can add any Icon to your ...READ MORE

answered Sep 3, 2020 in Others by MD
• 95,300 points
1,741 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,210 points
230 views
0 votes
1 answer

What is Flutter?

Hi@akhtar, Flutter is an app SDK for building ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,300 points
349 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,300 points
548 views
0 votes
1 answer

How to add one image in Flutter App?

Hi@akhtar, You can use Image.network() method to add ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,300 points
135 views
0 votes
1 answer

How to create a Volume Icon in Flutter App?

Hi@akhtar, You can use Icon Widget to create ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,300 points
545 views