The required arguments missing (view model)
Closed this issue · 1 comments
There was some missing argument in the room(feed,tile,detail), user.detail, required argument like agora ,database , auth ..
should i make them null ? or just set them not required so the problem will be fixed ?
Ah, you are taking about missing arguments in app_routes.dart
.
This is a good point and I guess I should fix the code. So when the initialModel
is created for RoomDetailScreen
arguments like database
and agora
are not used, as the screen will create a stream that will constantly feed RoomDetailViewModel
to the RoomDetailScreen
.
What I really should've done is only pass in room and currentUser directly to the RoomDetailScreen
object and not use RoomDetailViewModel
as an argument, as the view model serves a different purpose of mapping the stream to the screen.