I am using stacked architecture in my project. Here is my code
class InfoScreen extends StatelessWidget {
InfoViewModel viewModel;
@override
Widget build(BuildContext context) {
return ViewModelBuilder<InfoViewModel>.reactive(
builder: (context, model, child) => _buildUI(model),
viewModelBuilder: () => InfoViewModel());
}
_buildUI(InfoViewModel viewModel) {
return Scaffold(backgroundColor: Colors.white, body: MainScreen());
}
}
I am using the Stateless widget, So I can't use the didChangeDependencies() method to know the app state.
My Question is How do I handle app state in this screen? any help or idea is appreciated. thanks in advance