@('at sign')符号在飞镖中是什么意思?
What does the @ ('at sign') sign mean in dart?
@(at 符号)在 dart 中是什么意思?
@immutable
@JsonSerializable(createToJson: false)
class ClassA {
@JsonKey(name: 'field_1')
final int field1;
@JsonKey(name: 'field_2')
final String field2;
const ClassA(this.field1, this.field2);
factory ClassA.fromJson(Map<String, dynamic> json) => _$ClassAFromJson(json);
}
@ 符号表示 Metadata annotation
Use metadata to give additional information about your code. A metadata annotation begins with the character @, followed by either a reference to a compile-time constant (such as deprecated) or a call to a constant constructor.
更多关于dart.dev
@(at 符号)在 dart 中是什么意思?
@immutable
@JsonSerializable(createToJson: false)
class ClassA {
@JsonKey(name: 'field_1')
final int field1;
@JsonKey(name: 'field_2')
final String field2;
const ClassA(this.field1, this.field2);
factory ClassA.fromJson(Map<String, dynamic> json) => _$ClassAFromJson(json);
}
@ 符号表示 Metadata annotation
Use metadata to give additional information about your code. A metadata annotation begins with the character @, followed by either a reference to a compile-time constant (such as deprecated) or a call to a constant constructor.
更多关于dart.dev