可以在Dart编程语言的特定类中声明特定类型的变量吗?

时间:2019-04-02 09:30:29

标签: dart

以下代码来自https://www.dartlang.org/guides/language/language-tour#classes

class ImmutablePoint {
    static final ImmutablePoint origin =
          const ImmutablePoint(0, 0);
    final num x, y;
    const ImmutablePoint(this.x, this.y);
}

我想知道这段代码的含义吗?

static final ImmutablePoint origin =
  const ImmutablePoint(0, 0);

可以在ImmutablePoint类中声明ImmutablePoint类型的“原始”变量吗?

0 个答案:

没有答案