Home > Blockchain >  can I add more widget inside the image on flutter?
can I add more widget inside the image on flutter?

Time:12-22

Just started to learn fultter and I am trying to create a login page on flutter for an app and I found an image as the background of the login page. Is it possible to add some text and input field on the image ? Please let me know if there's a way to do so. Thanks.

CodePudding user response:

Yes, You have to use Stack widget for that. Initial one has your image and for textField you can add widget with Position.

CodePudding user response:

 Container(
  decoration: const BoxDecoration(
    image: DecorationImage(
      fit: BoxFit.cover,
      image: AssetImage('asset_image'),
    ),
  ),
  child: Column(
    children: [
      // Form field
    ],
  ),
);
  • Related