Home > Software engineering >  How can I get this look on my welcome screen? flutter
How can I get this look on my welcome screen? flutter

Time:09-13

I am trying to have a welcome screen like this: Here is the image

I have all the lines from the bottom and the orange and blue bubbles as asset images. How can I stack them all together and then use Text() widget for the writing part?

CodePudding user response:

You can do it without using stack by using the image property in container decoration.

 Container(
          decoration: const BoxDecoration(
              image: DecorationImage(
            image: AssetImage(
              'assets/images/bg.png',
            ),
            fit: BoxFit.cover,
          )),
          child: Column(
          children: [
          // your text widgets
          ])
        ),

CodePudding user response:

You can use the Stack widget to stack its children if that answers your question:

Stack(
   children: [
       your_images_here,
       your_text_here,
   ],
);

CodePudding user response:

So I had three images, and I couldn't use Imageprovider to use it as a background image of my main Container(). But, I decided to make a difference in my design by wrapping them all together using adobe photoshop and getting one image instead of three so that I can use ImageProvider instead of a stack. Then I used Decoration image and made the image the background of my page.

  • Related