Flutter用Showdialog设计透明的List搜索界面,支持模糊关键字:
代码实现很简单,只要不给Container和BoxDecoration设置颜色即可,即可实现透明的效果,用的插件叫
searchable_listview: ^1.0.0
,Flutter还蛮好玩的:
onPressed: () {
showDialog(
context: context,
builder: (context) {
return Container(
decoration: BoxDecoration(
// color: Colors.blue[100],
border: Border.all(
color: Colors.blue.shade100,
width: 3.0,
),
borderRadius: BorderRadius.circular(10),
),
width: 510,
padding: const EdgeInsets.all(20),
// color: Colors.blue[100],
alignment: Alignment.center,
child: searchBCGMData_Page(),
);
},