psk907 / fluttermoji

A light-weight and highly customizable SVG graphic set for Flutter which generates avatars and provides a Customizer Widget, personalized CircleAvatar and other utility functions.
https://pub.dev/packages/fluttermoji
MIT License
72 stars 50 forks source link

I got error with FluttermojiController with getx #18

Open lkrjangid1 opened 2 years ago

lkrjangid1 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

Ahmedkhattab21 commented 11 months ago

that because FluttermojiSaveWidget function