Difference between “var” and “dynamic” type in Dart?

前端 未结 11 2090
攒了一身酷
攒了一身酷 2021-01-30 10:25

According to this article:

As you might know, dynamic (as it is now called) is the stand-in type when a static type annotation is not provide

11条回答
  •  清歌不尽
    2021-01-30 10:49

    dynamic is a data type that indicates all data types in dart

    var is a variable declaration way like "final" that takes the data type of its value

提交回复
热议问题