Closed MobileMon closed 4 years ago
sup @MobileMon No. The reason we have the separate files is to have a clear separation between business logic / state and UI. Textedtitng is 100% UI related and should not be in the viewmodel. No ui things should be in the viewmodel, it has to be pure enough to test without Starting up flutter when writing unit tests.
You can use FlutterHooks if you don't want to use a stateful widget which is what I do.
Thanks @FilledStacks
Keep up the good work! Your tutorials are awesome and are very helpful!
General architecture question
Should the LoginViewModel contain the TextEditingController instead of having a stateful widget do so in the login_view?
That way you could manage all of the view's state right from within the ViewModel instead of having a separate state manager