【发布时间】:2022-11-10 03:07:41
【问题描述】:
我是 Flutter 的新手。 我正在尝试使用这句话
Map<String, Function> map = Map();
Function fun1 = (() => print("TAG : 1111"));
map.putIfAbsent("test", fun1);
map["test"]!.call();
但是在运行时,我遇到了这样的错误。
Dart Unhandled Exception: type '_TypeError'
由于不支持反射,我想使用包含某些功能的地图 我的情况有什么解决方案吗?
【问题讨论】:
标签: flutter