Open BlackHC opened 9 years ago
reminds me of Rails, where you could use attr_accessor :field
(adds both a getter and setter) or attr_reader :field
(just the getter) or attr_writer :field
(just the setter)
In any case, please email core-dev@dartlang.org mailing list (you might have to join the list first) with this proposal. We have a formal DEP process, detailed here: https://github.com/dart-lang/dart_enhancement_proposals
In Kotlin it is done this way:
var setterVisibility: String = "abc"
private set
In a project I am working on now we have a half a file of boilerplate code to make public getters and private setters. 😑
We have lots of boilerplate in AWV of the form:
It would be nice if there was a way to only make the setter of field private.