EmpireState<T extends EmpireWidget<EmpireViewModel> , E extends EmpireViewModel> constructor
Null safety
- E viewModel
Implementation
EmpireState(this.viewModel) {
viewModel.addOnStateChangedListener((events) {
if (widget.debugPrintStateChanges && kDebugMode) {
// ignore: avoid_print
events.forEach(print);
}
if (mounted) {
setState(() {});
}
});
}