Refactor LazyConsumer
Refactor LazyConsumer to start using FutureBuilder and Completer instead of addPostFrameCallback, which is much more reliable and testable.
Without Completer and FutureBuilder, LazyConsumer immediately builds the widget before ensuring that the provider is actually initialized. It shows the state of the provider, which can be, at the time, empty or incorrect. Later, after addPostFrameCallback, it initializes the provider asynchronously. By the time the provider finishes initializing, the widget might already have built once or even multiple times unnecessarily.
With Completer and FutureBuilder, the widget starts by waiting for the Future to complete. Only after the provider initialization completes, the main content builds properly, without unnecessary intermediate rebuilds.
You can also take a look into this: https://api.flutter.dev/flutter/widgets/StreamBuilder-class.html
After this, take a look into #1599