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 {
'value': () => _controller.value,
'min': () => _controller.minValue,
'max': () => _controller.maxValue,
'startValue': () => _controller.startValue,
'endValue': () => _controller.endValue,
'enableRange': () => _controller.enableRange,
'trackStyle': () => _controller.trackStyle,
'tickMarkStyle': () => _controller.tickMarkStyle,
'thumbStyle': () => _controller.thumbStyle,
'overlayStyle': () => _controller.overlayStyle,
'valueIndicatorStyle': () => _controller.valueIndicatorStyle,
};
}