mirror of
https://github.com/inventree/inventree-app.git
synced 2026-11-28 00:08:59 +00:00
Separate onBuild and refresh callbacks
This commit is contained in:
1 parent
90a39ae3de
commit
93630ea910
5 files changed
+35
-15
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user