copyWithBodyDeclaration method

String copyWithBodyDeclaration()

Implementation

String copyWithBodyDeclaration() {
  if (isNullable) {
    return '$name: checkOptional($name, () => this.$name)';
  } else {
    return '$name: $name ?? this.$name';
  }
}