But probably should be better if you map the Resource/s to a
sealed class
which describes the UI state
f
Florian
10/21/2020, 1:37 PM
but what about the typical sealed class Resource that just contains Success, Error, and Loading? Should the fragment make the decision what to do in each case? I thought that kind of logic belongs into the ViewModel
j
Javier
10/21/2020, 1:40 PM
It is similar to that sealed class if you removes OnNextScreen and rename Form to Success, with simple screens maybe there is no problem in understand what is happening with these three states, but with complex screen that resource can be difficult to understand