initState method
Performs initial setup before the first frame is rendered. If the ViewModel is IInitializable, this method will be triggered only AFTER the IInitializable.initialize() method is called (and it is async, so, in the buildWaiter method, the view model is NOT yet initialized!).
This method is called during the widget's initState() lifecycle stage,
before the first frame is drawn. Use this method for early initialization
tasks that do not require the widget to be fully rendered.
Typical use cases include:
- Basic configuration of widget properties
- Initial state setup
- Preliminary data preparation
Note: Avoid complex or time-consuming operations in this method to prevent delaying the first frame rendering.
Implementation
@protected
void initState(BuildContext context, TViewModel viewModel) {}