r/FlutterBeginner • • 14d ago

Circuitry: A DAG based dependency framework

/r/FlutterDev/comments/1xwstlm/circuitry_a_dag_based_dependency_framework/
1 Upvotes

2 comments sorted by

0

u/[deleted] 6d ago

[removed] — view removed comment

1

u/raman4183 6d ago

If an Async dependency fails to register then that error is propagated to the caller and it should be handled by “.build()” caller. When a failure occurs the initialised async dependencies are cleaned up if a “dispose” callback was provided.

I would say that there are three rules which will make it super easy to understand are these:

  1. Every retrieval is synchronous.
  2. Async dependencies and its sub-dependencies are resolved upfront.
  3. Sync dependencies are truly lazy.

2-3 can simply be simplified further as, Async dependencies are eager and sync are lazy.