【发布时间】:2022-11-22 17:10:47
【问题描述】:
我试图在警报对话框的文本中显示 Future<List> 的值,但我得到了 future<list> 的实例。 这是我的代码:
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
showDialog(
context: context,
barrierColor: Colors.transparent,
builder: (context) {
return AlertDialog(
title: Text(
'Be Careful ${characteristic46?.read()}'),
backgroundColor: Color.fromARGB(45, 231, 148, 54),
alignment: Alignment.topCenter,
);
});
});
在此先感谢您的帮助
【问题讨论】:
-
这回答了你的问题了吗? What is a Future and how do I use it?
标签: flutter dart bluetooth-lowenergy instance future