mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 18:25:26 +00:00
Separate onBuild and refresh callbacks
This commit is contained in:
@ -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