关键字

abstract 1 deferred 1 if super
as 1 do implements 1 switch
assert dynamic 1 import 1 sync* 2
async 2 else in this
async* 2 enum is throw
await export 1 library 1 true
break external 1 new try
case extends null typedef 1
catch factory 1 operator 1 var
class false part 1 void
const final rethrow while
continue finally return with
covariant 1 for set 1 yield 2
default get 1 static 1 yield* 2

1带有上标1的关键字均为 内置标识符 。避免使用此类标识符作为变量名。如果使用内置标识符作为类名或者变量名,则会有编译时错误出现。

2带有上标2的关键字都是新版本关键字,是 Dart 1.0 之后为了实现 异步编程 引入的。详见 #异步编程#

上表中的其它字段皆为保留字段,可以作为标识符使用。(不建议)

results matching ""

    No results matching ""