Aniketkhote / refreshed

Enhanced GetX for Flutter: Stability, Performance, Beginner-Friendly.
https://pub.dev/packages/refreshed
Other
67 stars 7 forks source link

binding error 2 #18

Open fisforfaheem opened 4 months ago

fisforfaheem commented 4 months ago

image

but even after fixing: image **** my isuse not reprieved why??

fisforfaheem commented 4 months ago

image

nandakista commented 4 months ago

the binding and getPage seems ok, but the following error looks like failed import the refreshed package can you please restart your IDE or flutter clean and re-get pub dependencies using flutter pub get ?

fisforfaheem commented 4 months ago

didnt fixed...

Aniketkhote commented 4 months ago

Could you please share a minimal sample of code for testing?

asterd commented 4 months ago

There were problems with binding.. it doesn't bind correctly.. what's happen?

asterd commented 4 months ago

@Aniketkhote in addition: the latest version that works good with binding is 2.5.2. From 2.5.3 something is broken and some binding were not called correctly and the system throws the Exception "you must call Get.put...."

aniketkhote9 commented 4 months ago

The interim solution is as follows:

Replace the usage of Bind.lazyPut(() => CountController()) with Bind.lazyPut<CountController>(() => CountController()).

asterd commented 4 months ago

@Aniketkhote sorry.. but i didn't see the difference in your example..

EDIT: gotcha!

fisforfaheem commented 4 months ago

Can you kindly come on anydesk for just 5 mins and help me out, I am trying so hard but no luck :(

I dont want to use GETX i want o use refreshed but unable to :

Aniketkhote commented 4 months ago

@fisforfaheem If your issue is resolved, kindly close it

fisforfaheem commented 4 months ago

Not fixed

Aniketkhote commented 4 months ago

@fisforfaheem Check the below example, maybe it help to resolve the issue. https://github.com/Aniketkhote/refreshed/tree/main/demo

asterd commented 4 months ago

@Aniketkhote just a question. I use a lot the Bind.put(LoginController(), permanent: true) as a porting of the old permanent binding of GetX.

Now, I see in the code that the put method has:

static Bind<S> put<S>(
    S dependency, {
    String? tag,
    bool permanent = false,
  }) {
    Get.put<S>(dependency, tag: tag, permanent: permanent);
    return _FactoryBind<S>(
      autoRemove: permanent,
      assignId: true,
      tag: tag,
    );
  }

But, autoRemove: permanent means that if I set permanent to true, it autoremoves the controller. In fact, I have this issue since I migrate to your solution: the permanent controllers are disposed automatically..

fisforfaheem commented 4 months ago

@Aniketkhote Brother can i share my repo with you, i cant share it as public, need your help with it, i cant seem to understand even with example u shared.

arupbkp commented 3 months ago

@fisforfaheem use BindingsInterface