getter function
Implementation
Method getter(String name, String type, {bool isAbstract = true}) {
return Method((m) => m
..name = name
..type = MethodType.getter
..returns = refer(type)
..body = isAbstract ? null : Code('return this.$name;'));
}