skip to Main Content

Column(
children: [
ListTile(
visualDensity: VisualDensity(horizontal: 0, vertical: 3),
contentPadding: const EdgeInsets.symmetric(horizontal: 0.0, vertical: 0.0),
//contentPadding: EdgeInsets.only(left: 0.0, right: 0.0),

            leading: IconButton(
              onPressed: (){},
              icon:const Icon(Icons.location_on_outlined,size: 40,) ),
              title: GestureDetector(
                onTap: (){
    
                },
                child: const Text("PICK UP",style: TextStyle(
                  fontSize: 19,
                  fontWeight: FontWeight.w500,
                  color:Color.fromARGB(255, 152, 182, 55)
                ),)
                ),
              subtitle:const Text("Mysore,",style: TextStyle(
                fontSize: 16,
                fontWeight: FontWeight.w500,
                color: Colors.black
              ),),
          ),
          
          ListTile(
            visualDensity: VisualDensity(horizontal: 0, vertical: 3),
            contentPadding: const EdgeInsets.symmetric(horizontal: 0.0, vertical:0),
            
            leading: IconButton(
              onPressed: (){},
              icon:const Icon(Icons.location_on_outlined,size: 40,) ),
              title: GestureDetector(
                onTap: (){
    
                },
                child: const Text("DROP OFF",style: TextStyle(
                  fontSize: 19,
                  fontFamily: "Ubuntu",
                  fontWeight: FontWeight.w500,
                  color:Color.fromARGB(255, 152, 182, 55)
                ),)
                ),
              subtitle:const Text("Bangalore,",style: TextStyle(
                fontSize: 16,
                fontWeight: FontWeight.w500,
                color: Colors.black
              ),),
          )
        ],
      ),

i added twlo list tile inside column but i dont ant space between two ListTile

3

Answers


  1. Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              SizedBox(height: 5),
              ListTile(
                visualDensity: VisualDensity(horizontal: 0, vertical: -2),
                contentPadding: const EdgeInsets.symmetric(horizontal: 0.0, vertical: 0),
                leading: IconButton(
                    onPressed: () {},
                    icon: const Icon(Icons.location_on_outlined, size: 40,)),
                title: GestureDetector(
                    onTap: () {},
                    child: const Text(
                      "DROP OFF",
                      style: TextStyle(
                          fontSize: 19,
                          // fontFamily: "Ubuntu",
                          // fontWeight: FontWeight.w500,
                          color: Color.fromARGB(255, 152, 182, 55)
                      ),
                    )),
                subtitle: const Text(
                  "Bangalore,",
                  style: TextStyle(
                      fontSize: 16,
                      fontWeight: FontWeight.w500,
                      color: Colors.black),
                ),tileColor: Colors.yellow,
                dense: true,
    
              ),
              ListTile(
                visualDensity: VisualDensity(horizontal: 0, vertical: -2),
                contentPadding: const EdgeInsets.symmetric(horizontal: 0.0, vertical: 0),
                leading: IconButton(
                    onPressed: () {},
                    icon: const Icon(Icons.location_on_outlined, size: 40,)),
                title: GestureDetector(
                    onTap: () {},
                    child: const Text(
                      "DROP OFF",
                      style: TextStyle(
                          fontSize: 19,
                          // fontFamily: "Ubuntu",
                          // fontWeight: FontWeight.w500,
                          color: Color.fromARGB(255, 152, 182, 55)
                      ),
                    )),
                subtitle: const Text(
                  "Bangalore,",
                  style: TextStyle(
                      fontSize: 16,
                      fontWeight: FontWeight.w500,
                      color: Colors.black),
                ),tileColor: Colors.yellow,
                dense: true,
    
              ),
    
            ],
          ),
    
    Login or Signup to reply.
  2. You can use contentPadding property to remove padding,
    set this property to zero

    Login or Signup to reply.
  3. You can wrap your listtile with sizedbox or use negative value in visual density

          children: [
            SizedBox(
              height: 45,
              child: ListTile(
    leading: IconButton(
                    onPressed: () {},
                    icon: const Icon(
                      Icons.location_on_outlined,
                      size: 40,
                    )),
                title: GestureDetector(
                    onTap: () {},
                    child: const Text(
                      "PICK UP",
                      style: TextStyle(
                          fontSize: 19,
                          fontWeight: FontWeight.w500,
                          color: Color.fromARGB(255, 152, 182, 55)),
                    )),
                subtitle: const Text(
                  "Mysore,",
                  style: TextStyle(
                      fontSize: 16,
                      fontWeight: FontWeight.w500,
                      color: Colors.black),
                ),
              ),
            ),
            SizedBox(
                height: 45,
                  leading: IconButton(
                      onPressed: () {},
                      icon: const Icon(
                        Icons.location_on_outlined,
                        size: 40,
                      )),
                  title: GestureDetector(
                      onTap: () {},
                      child: const Text(
                        "DROP OFF",
                        style: TextStyle(
                            fontSize: 19,
                            fontFamily: "Ubuntu",
                            fontWeight: FontWeight.w500,
                            color: Color.fromARGB(255, 152, 182, 55)),
                      )),
                  subtitle: const Text(
                    "Bangalore,",
                    style: TextStyle(
                        fontSize: 16,
                        fontWeight: FontWeight.w500,
                        color: Colors.black),
                  ),
                ))
          ],
        );
    
    or use negative value in visual density
    
    Column(
          children: [
            ListTile(
              visualDensity: VisualDensity(horizontal: 0, vertical: -4),
              leading: IconButton(
                  onPressed: () {},
                  icon: const Icon(
                    Icons.location_on_outlined,
                    size: 40,
                  )),
              title: GestureDetector(
                  onTap: () {},
                  child: const Text(
                    "PICK UP",
                    style: TextStyle(
                        fontSize: 19,
                        fontWeight: FontWeight.w500,
                        color: Color.fromARGB(255, 152, 182, 55)),
                  )),
              subtitle: const Text(
                "Mysore,",
                style: TextStyle(
                    fontSize: 16, fontWeight: FontWeight.w500, color: Colors.black),
              ),
            ),
            ListTile(
              visualDensity: VisualDensity(horizontal: 0, vertical: -4),
              leading: IconButton(
                  onPressed: () {},
                  icon: const Icon(
                    Icons.location_on_outlined,
                    size: 40,
                  )),
              title: GestureDetector(
                  onTap: () {},
                  child: const Text(
                    "DROP OFF",
                    style: TextStyle(
                        fontSize: 19,
                        fontFamily: "Ubuntu",
                        fontWeight: FontWeight.w500,
                        color: Color.fromARGB(255, 152, 182, 55)),
                  )),
              subtitle: const Text(
                "Bangalore,",
                style: TextStyle(
                    fontSize: 16, fontWeight: FontWeight.w500, color: Colors.black),
              ),
            )
          ],
        );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search