update method
- SampleData data
Updates the view models with the latest data.
Implementation
void update(SampleData data) {
min.value = data.min ?? 0;
min.controller.text = min.value.toString();
average.value = data.average ?? 0;
average.controller.text = average.value.toString();
max.value = data.max ?? 0;
max.controller.text = max.value.toString();
notifyListeners();
}