Flutter expansionTile title padding

Viewed 2564

How we can remove space between leading and title in Flutter ExpansionTile? enter image description here

3 Answers

Please try below snipppet

ExpansionTile(title: Row(children: [
  // Icon View,
  // SizedBox of desired width,
  // Text View
  ]),
  children:  ... ,)

If you want to remove padding out side your view Set ExpantionTile tile padding to zero

ExpansionTile(tilePadding: EdgeInsets.zero, 
     title: Row(children: [
  // Icon View,
  // SizedBox of desired width,
  // Text View
  ]),
  children:  ... ,)

Try wrapping your title with Alignment like below

title: Align(
      child: Text(
          "Your text over here"
      ),
      //You may change value from -1.5 to anything which works better for you
      alignment: Alignment(-1.5, 0),
    ),
    dense: true,
  )
ListTile(

  title: Row(

  children: <Widget>[

   Icon(Icons.android),

       Text("Title")
],),)
Related