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

I got error with FluttermojiController with getx #18

Open
lkrjangid1 opened this issue Apr 10, 2022 · 3 comments
Open

I got error with FluttermojiController with getx #18

lkrjangid1 opened this issue Apr 10, 2022 · 3 comments

Comments

@lkrjangid1
Copy link

Code:

  FluttermojiController fluttermojiController =
      Get.find<FluttermojiController>();

Error:

════════ Exception caught by widgets library ═══════════════════════════════════
The following message was thrown building Builder:
"FluttermojiController" not found. You need to call "Get.put(FluttermojiController())" or "Get.lazyPut(()=>FluttermojiController())"

The relevant error-causing widget was
MaterialApp
lib\my_app.dart:114
When the exception was thrown, this was the stack
@psk907
Copy link
Owner

psk907 commented May 12, 2022

before you can use the controller, you need to add it to the getx dependency injection system.
To achieve this you need to call Get.put(FluttermojiController()) in your lib\my_app.dart file's initState() method.

@mariuszmalek
Copy link

@psk907, you should update "/example". In there is the same issue.

@Ahmedkhattab21
Copy link

that because FluttermojiSaveWidget function

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

4 participants