gpt4 book ai didi

swift - Dart 中有类似 "Any"类型的 Swift 吗?

转载 作者:IT王子 更新时间:2023-10-29 07:16:37 25 4
gpt4 key购买 nike

我是 dart 的新手,正在探索它的一些功能。在到处搜索后,我发现“动态”用于类似任何对象。但是我想将任何类作为函数参数传递。类似于快速的“任何”。

我想创建一个可以返回动态类模型的通用服务调用方法。

我正在使用 Future 方法

最佳答案

Object

The base class for all Dart objects.

Because Object is the root of the Dart class hierarchy, every other Dart class is a subclass of Object.

https://api.dart.dev/stable/2.4.0/dart-core/Object-class.html

关于swift - Dart 中有类似 "Any"类型的 Swift 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57193663/

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