zaiste / sprinkle

A convenient Flutter architecture for happy programmers
Other
85 stars 15 forks source link

[Manager asks another Manager for help] don’t work #10

Open saleh-aleid opened 4 years ago

saleh-aleid commented 4 years ago

Dear Zaiste,

Thank you very much for your great effort. I tried the (Manager asks another Manager for help) feature, but it didn't work for me. example: var manager = use<MyManager>(); error: The method 'use' isn't defined for the type 'HomeManager'. Try correcting the name to the name of an existing method, or defining a method named 'use'.

zaiste commented 4 years ago

@saleh-aleid Yes, I needed to (temporarily) disable that feature. Sorry for the confusion. I'll push a fix in the next few days.

nejcsever commented 3 years ago

@zaiste is this something that will be fixed? Is there any workaround in order to achieve that feature without use method?

saleh-aleid commented 3 years ago

@nejcsever you can use this:

final managerName = supervisor.summon<OtherManager>();

nejcsever commented 3 years ago

@saleh-aleid Are you passing supervisor into constructor to other managers then?

saleh-aleid commented 3 years ago

@nejcsever no see this link: Automatic Provider Setup

nejcsever commented 3 years ago

Oh, ok got it it's imported as a constant. Thanks.