Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove this gray line from ExpansionTile? (Flutter)

How can I remove this gray line from ExpansionTile in flutter?

enter image description here

The Code

ExpansionTile(
          title: Text(
            "Title",
            style: TextStyle(
              fontSize: 18.0,
              fontWeight: FontWeight.bold
            ),
          ),
          children: <Widget>[
            ListTile(
              title: Text(
                'data'
              ),
            )
          ],
        ),
like image 545
Thales Albert0 Avatar asked Jan 22 '26 06:01

Thales Albert0


1 Answers

You can solve this applying a transparent color to the dividerColor in the ThemeData in your MaterialApp definition.

MaterialApp(
   title: 'Your Flutter App',
   theme: ThemeData(
      primarySwatch: Colors.blue,
      dividerColor: Colors.transparent,
  ),

Of course you can make your own implementation of a custom widget.

like image 189
encubos Avatar answered Jan 24 '26 21:01

encubos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!