mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Separate onBuild and refresh callbacks
This commit is contained in:
parent
90a39ae3de
commit
93630ea910
5 changed files with 35 additions and 15 deletions
|
|
@ -15,7 +15,12 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T> {
|
|||
|
||||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => request(context));
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => onBuild(context));
|
||||
}
|
||||
|
||||
// Function called after the widget is first build
|
||||
Future<void> onBuild(BuildContext context) async {
|
||||
return;
|
||||
}
|
||||
|
||||
// Function to request data for this page
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue