flutter_clean_architecture
flutter_clean_architecture copied to clipboard
Unable to override `initState` on ViewState
Describe the bug I am unable to override initState in ViewState to properlly handle animation.
To Reproduce Steps to reproduce the behavior:
- Create an implementation of ViewState likes it is done here https://github.com/ShadyBoukhary/Axion-Technologies-HnH/blob/development/lib/app/pages/splash/splash_view.dart#L24
- Override the method
initState - This message is displayed:
The member 'initState' is declared non-virtual in 'ViewState' and can't be overridden in subclasses.
Expected behavior I should be able to override initState.
Library (please complete the following information):
- Version [5.0.0]
Additional context Add any other context about the problem here.
In view.dart on the method initState should not be @nonVirtual. It should be @mustCallSuper.
We should expose _controller to from view.dart.
Feel free to open a pull request
@dcdh just use onInitState replacement life cycle