getJoke method Null safety
Implementation
Future<void> getJoke() async {
state = state.copyWith(isLoading: true);
await jokeRepository.fetchJoke().then((data) {
state = state.copyWith(joke: data, isLoading: false);
});
}
Future<void> getJoke() async {
state = state.copyWith(isLoading: true);
await jokeRepository.fetchJoke().then((data) {
state = state.copyWith(joke: data, isLoading: false);
});
}