Is there similar Swift like "Any" type in Dart?
1,863
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 ofObject
.
https://api.dart.dev/stable/2.4.0/dart-core/Object-class.html
Author by
Nick
Updated on December 12, 2022Comments
-
Nick over 1 year
I am new to dart and exploring some of its features. After searching everywhere I found "dynamic" is used for similar like any object. But I want to pass any class as a function parameter. Similar to the swift "Any".
I want to create a generic service call method which can return dynamic class model.
I am using
Future method