0

My question is similar to this, but for flutter web: boostrap relative footer goes up when zoom out window

So when I zoom out or the content is so small that you can't scroll at all, then the footer always goes up with. This then leaves unsightly white space under the footer. Is there a solution to get around this? My goal is to have the white space between the content of the page and the footer as soon as you zoom out or similar.

My structure is the following:

return Scaffold(
    body: ListView(
         children : [
              Column(
                   crossAxisAlignment: CrossAxisAlignment.center,
                   children: [
                   // here is the content of the site
                   const Footer()
                   ],
              ),
          ],
     ),
);

The footer is just a container with some content.

DT16
  • 5
  • 3

2 Answers2

0

You can structure your code in the following way:

--Column
  |
  |-- Expanded --
                 |-- SingleChildScrollView (content of your site)
  |
  |-- Container(Your Footer)
Priyaank
  • 141
  • 6
  • Unfortunately, the behavior is similar (same?) to the proposed solution by @Fabio Henrique with the bottomNavigationBar. I.e. the footer is fixed at the bottom of the screen, even if there is still content on the page. But this is not supposed to be like this and is not usual for web footers. – DT16 Mar 03 '23 at 17:50
0

Use the bottomNavigationBar tag its from Scaffold and accept a Widget inside that you can customize and put whatever you want, and don't move when you scroll :)

Scaffold(
  appBar: AppBar(
    title: Text('test'),
  ),
  body: SingleChildScrollView(
    child: Column(
      children: [
        Text('test'),
      ],
    ),
  ),
  bottomNavigationBar: Container(
    child: Text('abc'),
  ),
)
  • I don't want the bottomNavigationBar behavior. The footer should not be fixed, but come below (!) the actual content of the page. – DT16 Mar 03 '23 at 17:43