FilledStacks / FilledStacks/flutter-tutorials

Stream controller providing stale values for onModelReady()

オープン
#129 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Dart
スター
4.8k
フォーク
1.7k
PR マージ指標
30日以内にマージされた PR はありません

説明

I followed the pattern you suggested in provider-aechitecture-pt2

The flow is common as follows, login view gets user credentials , passes to login view model which then passes to auth service. After api call is successful auth service adds user to user stream controller and then on login success navigator.pushNamed()
Which pushes to homeview

ref - https://github.com/FilledStacks/flutter-tutorials/blob/master/012-provider-architecture-pt2/2-final/lib/ui/views/home_view.dart

onModelReady: (model) => model.loadData(Provider.of(context))

The issue I am facing is that the stream controller doesn't pass the user before model.loadData() is called for homeview. After reading a few articles I got to know that there is no way to ensure if streams deliver data. Am I missing something? how can I solve this issue?

Not sure if this is the right place to ask this question

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with the home_view.dart example linked in the issue, especially the onModelReady call and its model.loadData(Provider.of(context)) argument. Trace the login success path through the auth service and user stream controller, then verify the ordering between publishing the user and navigating to HomeView. Done means the home view receives the intended user before loadData runs.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
dart, flutter
領域
authentication, mobile
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。