Cześć, jak trzymacie dane w ChangeNotifierach, które zaciągacie z backendu. Ja mam coś takiego:
class WeatherStatsNotifier extends ChangeNotifier {
WeatherService weatherService;
Future<WeatherStats> _stats;
WeatherStatsNotifier({this.weatherService});
Future<WeatherStats> get stats => _stats;
void refreshStats() {
_stats = weatherService.fetchWeatherStats();
}
}
ale zastanawiam się czy nie powinienem tego _stats
trzymać jako nie-future. I zastanawiam się dlaczego w refreshStats()
nie muszę używać notifyListeners()