flutter typeof
时间: 2023-09-22 13:13:29 浏览: 134
jsp物流信息网建设(源代码+论文)(2024vl).7z
Flutter does not have a built-in typeof keyword. In Dart (the programming language used for Flutter), you can use the runtimeType property to get the type at runtime. For example:
```dart
var variable = "Hello";
print(variable.runtimeType); // Output: String
var number = 10;
print(number.runtimeType); // Output: int
var myList = [1, 2, 3];
print(myList.runtimeType); // Output: List<int>
```
You can use this property to get the type of any variable at runtime.
阅读全文