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

Unable to use the library with flutter. #38

Open
CryptLabs opened this issue Feb 22, 2022 · 6 comments
Open

Unable to use the library with flutter. #38

CryptLabs opened this issue Feb 22, 2022 · 6 comments

Comments

@CryptLabs
Copy link

CryptLabs commented Feb 22, 2022

Hello,

I'm trying to use the library with flutter using Android studio. However, every time I try to run the app, I get this error:

/flutter ( 5403): [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: error: import of dart:mirrors is not supported in the current Dart runtime
E/flutter ( 5403): [ERROR:flutter/runtime/dart_isolate.cc(141)] Could not prepare isolate.
E/flutter ( 5403): [ERROR:flutter/runtime/runtime_controller.cc(381)] Could not create root isolate.
E/flutter ( 5403): [ERROR:flutter/shell/common/shell.cc(580)] Could not launch engine with configuration.

I think that this is because of the dart:mirrors package. Any advice would be appreciated.

Thank you.

@Inferture
Copy link

Hello,

I think this fork addresses the issue with flutter: ostafen's fork.

Cheers,

@CryptLabs
Copy link
Author

CryptLabs commented Feb 25, 2022

Hello,

Thank you so much for the great library and kind support.
I will take a look at the fork and check if it works. Keep up the excellent work. I wish you all the best.
How do I pull the fork into my current Flutter project if it shares the same name? I'm new to Dart and Flutter.

Kind regards.

@Inferture
Copy link

Hello,

Just to be clear, I did not take any part in the making this package, I just ran into the same problem with flutter when trying to use it and the fork I linked solved it for me.

If I remember well, I believe I just removed the original package and instead copied the content of the lib folder from the fork into my project (into an IRC folder). I don't remember if there were any tweaks to do afterwards, but I can confirm that it seems to work with flutter and Android (I don't think it does on web though)

Good luck,

@CryptLabs
Copy link
Author

Thanks for the reply,

Can you please explain how to do it step by step? I'm a little bit confused.
Should I edit and add anything to the pubspec.yaml file?

I have this inside pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  irc: "^4.0.0"

Kind regards.

@ostafen
Copy link

ostafen commented Feb 26, 2022

Put this under the dependencies node.

dependencies:
  flutter:
      sdk: flutter

  irc:
      git:
        url: git://github.com/ostafen/irc.dart
        ref: flutter``

@CryptLabs
Copy link
Author

CryptLabs commented Feb 26, 2022

Thank you both for the great and kind support!
I will try it.

Kind regards.

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

3 participants