I'm using Flutterflow which is basically a drag and drop system for coding flutter, i implemented an API Call using Google Books API to a ListView Widget, The Flutterflow Debugger itself shows no errors but on run i get the error "lib/pages/library/makearequest/makearequest_widget.dart:462:45: Error: The getter 'llvLibraryBookRequestResponse' isn't defined for the class '_MakearequestWidgetState'.
- '_MakearequestWidgetState' is from 'package:afit_student_companion/pages/library/makearequest/makearequest_widget.dart' ('lib/pages/library/makearequest/makearequest_widget.dart')."
The error is a compilation error from the make request class How can i go about fixing this issue with regards to flutter Here is a sample of the code portion
LibraryBookRequestCall.call(
searchTerm: _model.textController.text,
).then((llvLibraryBookRequestResponse) {
final pageItems = (getJsonField(
llvLibraryBookRequestResponse
.jsonBody,
r'''$.items''',
) ??
[])
.take(15 - nextPageMarker.numItems)
.toList() as List;
final newNumItems =
nextPageMarker.numItems + pageItems.length;
_model.pagingController!.appendPage(
pageItems,
(pageItems.length > 0) && newNumItems < 15
? ApiPagingParams(
nextPageNumber:
nextPageMarker.nextPageNumber + 1,
numItems: newNumItems,
lastResponse:
llvLibraryBookRequestResponse,
)
: null,
);
});
});
return _model.pagingController!;
}(),
padding: EdgeInsets.zero,
reverse: false,
scrollDirection: Axis.vertical,
builderDelegate: PagedChildBuilderDelegate<dynamic>(
// Customize what your widget looks like when it's loading the first page.
firstPageProgressIndicatorBuilder: (_) => Center(
child: SizedBox(
width: 40,
height: 40,
child: CircularProgressIndicator(
color: FlutterFlowTheme.of(context).primary,
),
),
),
The Full Code Sample for the page can be found on JustPasteIt
I tried following the suggestions from this thread Stack Overflow Thread and Stack Overflow Thread as the issue being solved is similiar to mine, but i couldnt understand how to implement this for myself. I need more clearer explanantions. Thanks