【发布时间】:2021-09-20 12:54:51
【问题描述】:
我正在处理一个颤振项目,我想在单击特定磁贴时弹出以生成。这是我的代码
这是我的 ListTile 生成器
Future<Widget> getRecordView() {
print("405 name " + name.toString());
print(nameArr);
var items = List<Record>.generate(int.parse(widget.vcont), (index) => Record(
name: nameArr[index],
type: typeArr[index],
address: addressArr[index],
state: stateArr[index],
phone:phoneArr[index],
city: cityArr[index],
id: idArr[index],
));
print("Started");
var listItems = items;
var listview = ListView.builder(
itemCount: int.parse(widget.vcont),
itemBuilder: (context,index){
return listItems[index] ;
}
);
return Future.value(listview);
}
我需要的弹出窗口:
Future <bool> details(BuildContext context,String type) {
return Alert(
context: context,
type: AlertType.success,
title: "Submission",
desc: type, //The parameter
buttons: [
DialogButton(
child: Text(
"OKAY",
style: TextStyle(color: Colors.white, fontSize: 20),
),
onPressed: () => Navigator.pop(context),
color: Color.fromRGBO(0, 179, 134, 1.0),
radius: BorderRadius.circular(0.0),
),
],
).show();
}
我尝试使用 GestureDetector 和 Inkwell 包装 Record,但我只收到了错误,Android Studio 告诉我在这种情况下不需要 Record。我在互联网上查找并找不到任何关于这件事的信息。请帮忙。
【问题讨论】:
标签: flutter popup gesture-recognition