gpt4 book ai didi

flutter - 可以用吗??在这种情况下是运营商?

转载 作者:行者123 更新时间:2023-12-05 05:47:08 25 4
gpt4 key购买 nike

假设情况如下:

dynamic? _rsomeFunc() {
final smth = someGetFunction(); //may return null
return smth != null ? someObject.fromJson(jsonDecode(smth)) : null;
}

是否可以通过 => 在单行函数中编写它?因为这种方法似乎并不完美。我通过 ?? 尝试过,但没有帮助。有什么建议吗?

最佳答案

感谢@jamesdlin 提供的引用资料。目前 (2022/02/10) 在 Dart 2.16 中没有这样的机会;

希望他们会添加它。

关于flutter - 可以用吗??在这种情况下是运营商?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71056408/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com