getters method
mark these functions as protected as we need the implementations, but discourage direct usages. Reasons:
- There are more base getters/setters/methods from the base class. Users can just focus on defining only applicable fields for their classes but still get the base implementations automatically.
- setProperty() will automatically notify the controller's listeners for changes, enabling the listeners (widget state) to redraw.
Use getProperty/setProperty/callMethod instead of these.
Implementation
@override
Map<String, Function> getters() {
return {
'client': () => client?.name,
'provider': () => provider?.name,
'id': () => id,
'name': () => name,
'email': () => email,
'photo': () => photo,
'data': () => data,
'phoneNumber': () => phoneNumber,
};
}