【发布时间】:2019-06-23 22:54:53
【问题描述】:
我尝试在 Inkwell 中使用 onTap 打开/预览现有卡片,但不确定如何执行此操作,现在我只是让它打印“你好”
body: Container(
color: Colors.indigo,
child: Column(
children: <Widget>[
Flexible(
child: FirebaseAnimatedList(
query: databaseReference,
itemBuilder: (
_, DataSnapshot snapshot,
Animation<double> animation, int index) {
return Card(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: InkWell(
child: ListTile(
title: Text(
boardMessages[index].subject,
style: TextStyle(fontWeight: FontWeight.bold
),),
),
onTap: (){
print('hello');
},
),
),
);
},
),
),
],
),
编辑:感谢提供的文档,我知道如何使用全屏页面来做到这一点,我将如何使用对话框来做到这一点?非常感谢
【问题讨论】:
-
这取决于您的需求,您需要对话框还是全屏页面?
-
全屏页面 ;)