'How can I remove this gray line from ExpansionTile? (Flutter)
Solution 1:[1]
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.
Solution 2:[2]
you can wrap the widget with Material Theme like this :
Theme(
data: ThemeData(
dividerColor: Colors.transparent,
),
child: ExpansionTile(
tilePadding: EdgeInsets.all(0),
childrenPadding: EdgeInsets.all(0),
title: Text(
"Title",
style:
TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: <Widget>[
ListTile(
title: Text('data'),
)
],
),
),
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | encubos |
Solution 2 | JamilREX |