fetchDailyWisdom method

void fetchDailyWisdom()

Implementation

void fetchDailyWisdom() {
  if (_fetched == 'none') {
    _fetched = 'in_progress';
    ContentApi().getWisdomOfTheDay().then((value) {
      if (value.data != null && value.data!.isNotEmpty) {
        _value = value.data!.first;
        _fetched = 'completed';
        notifyListeners();
      }
    }).catchError((error) {
      _fetched = 'none';
    });
  }
}