getItems method
Implementation
Future<void> getItems() async {
try {
emit(state.copy(isLoading: true));
final response = await handler.gets();
emit(state.copy(result: response.result, isLoading: false));
} catch (_) {
emit(state.copy(error: "Something went wrong!"));
rethrow;
}
}