You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WHY THIS FUNCTION IS UNDERLINED BY RED COLOR @OverRide
Stream mapEventToState(currentState, event) async* {
if (event is FetchBook && !_hasReachedMax(currentState)) {
try {
if (currentState is BookUninitialized) {
final books = await _fetchBooks(0, 20);
yield BookInitialized.success(books);
}
if (currentState is BookInitialized) {
final books = await fetchBooks(currentState.books.length, 20);
yield books.isEmpty
? currentState.copyWith(hasReachedMax: true)
: BookInitialized.success(currentState.books + books);
}
} catch () {
yield BookInitialized.failure();
}
}
}
The text was updated successfully, but these errors were encountered:
WHY THIS FUNCTION IS UNDERLINED BY RED COLOR
@OverRide
Stream mapEventToState(currentState, event) async* {
if (event is FetchBook && !_hasReachedMax(currentState)) {
try {
if (currentState is BookUninitialized) {
final books = await _fetchBooks(0, 20);
yield BookInitialized.success(books);
}
if (currentState is BookInitialized) {
final books = await fetchBooks(currentState.books.length, 20);
yield books.isEmpty
? currentState.copyWith(hasReachedMax: true)
: BookInitialized.success(currentState.books + books);
}
} catch () {
yield BookInitialized.failure();
}
}
}
The text was updated successfully, but these errors were encountered: