skip to Main Content

Hey everyone can help to solve space between ListView widget and top widget top widget is the svg image also i make scaffold background color red to see space and ListView background

This is image of the app
enter image description here

This is example i went

This link is source code
https://drive.google.com/drive/folders/15UIyRZXj8bDRQeTBdyxGFvQ90SxCJJjq?usp=drive_link

2

Answers


  1. You can follow the following ways to achieve the results:

    1. Remove padding in list view

    Usually, listview has padding in it. You can remove as following:

    padding: EdgeInsets.zero,
    

    2. Space around svg

    You need to crop the svg in editors. There are spaces around the images or svg, you need to crop to remove this. To remove space around the SVG, follow this link.

    3. Use Stack widget

    If none of the above solutions work, you can use the Stack widget. In stack you can use Positioned to adjust the listview, you can give any position you want.

    Login or Signup to reply.
  2. You can remove the default top padding of the ListView by wrapping it with a MediaQuery.removePadding widget and setting removeTop to true.

    return MediaQuery.removePadding(
        context: context,
        removeTop: true,
        child: ListView.builder(
         .......
        )
      );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search