Change background color of ListTile upon selection in Flutter

前端 未结 12 1784
闹比i
闹比i 2020-12-15 03:10

I\'ve made a ListView in Flutter, but now I have some ListTiles in this ListView that can be selected. Upon selection, I want the back

12条回答
  •  情书的邮戳
    2020-12-15 04:02

    Your answer has been answered in Github.

    Card(
      color: Colors.white,
      shape: ContinuousRectangleBorder(
        borderRadius: BorderRadius.zero,
      ),
      borderOnForeground: true,
      elevation: 0,
      margin: EdgeInsets.fromLTRB(0,0,0,0),
      child: ListTile(
        // ...
      ),
    )
    

提交回复
热议问题