Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binding error 2 #18

Open
fisforfaheem opened this issue Apr 28, 2024 · 15 comments
Open

binding error 2 #18

fisforfaheem opened this issue Apr 28, 2024 · 15 comments
Assignees

Comments

@fisforfaheem
Copy link

image

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

@fisforfaheem
Copy link
Author

image

@nandakista
Copy link

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
Copy link
Author

didnt fixed...

@Aniketkhote
Copy link
Owner

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

@asterd
Copy link

asterd commented Apr 30, 2024

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

@asterd
Copy link

asterd commented Apr 30, 2024

@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
Copy link

aniketkhote9 commented Apr 30, 2024

The interim solution is as follows:

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

@asterd
Copy link

asterd commented Apr 30, 2024

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

EDIT: gotcha!

@fisforfaheem
Copy link
Author

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
Copy link
Owner

@fisforfaheem If your issue is resolved, kindly close it

@fisforfaheem
Copy link
Author

Not fixed

@Aniketkhote
Copy link
Owner

Aniketkhote commented May 10, 2024

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

@asterd
Copy link

asterd commented May 10, 2024

@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
Copy link
Author

@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
Copy link

arupbkp commented May 20, 2024

@fisforfaheem use BindingsInterface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants