Questions tagged [flutter-scoped-model]

4 questions
3
votes
0 answers

Passing Scoped Model as Function Argument vs Using ScopedModelDescendant

What is the recomended way to use ScopedModel in functions? Should i pass the model as an argument or should i always use ScopedModelDescendant wherever i used the model? Using ScopedModelDescendant: class Foo extends StatelessWidget { Widget…
Pionix
  • 413
  • 2
  • 8
2
votes
1 answer

function SignOut Firebase returns true - Flutter

When I press the "Logout" in app, the currentUser become null but don't really logout app, I'm using ScopedModel, if I print(model.isLoggedIn()) returns true, it means that exist some user in app, but the user is null. When I press to signOut, I…
1
vote
0 answers

How to solve the given algorithm issue?

Basically, I am trying to fetch all comments through pagination and it's working nicely. But in case of reply, I am trying to fetch and show reply which comment has reply only and I am showing in listview builder. But problem is all reply is showing…
0
votes
1 answer

How do I have my app change screens based on my user state?

I am using the ScopedModel pattern, but I am also interested how this same problem is addressed in the similar Provider pattern. Currently I have a ScopedModel with a bool exposed called loggedIn. When the FirebaseonAuthStateChanged stream changes…
Scorb
  • 1,654
  • 13
  • 70
  • 144