Fix deprecations, use properties

Guessing more and more folks will be looking at this

Good to represent proper Dart code