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

Error: 'Uint8List' is restricted and can't be extended or implemented. #11

Closed
muriloventuroso opened this issue May 24, 2021 · 5 comments

Comments

@muriloventuroso
Copy link

I am getting this error when running:

ERROR: ../../../.pub-cache/hosted/pub.dartlang.org/pinenacl-0.2.1/lib/api/api.dart:24:7: Error: 'Uint8List' is restricted and can't be extended or implemented.
ERROR: class ByteList with ListMixin<int>, Encodable implements Uint8List {
ERROR:       ^

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 2.3.0-13.0.pre.136, on Arch Linux 5.12.6-arch1-1, locale pt_BR.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    ✗ cmdline-tools component is missing
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 4.1)
[✓] Connected device (1 available)

! Doctor found issues in 2 categories.

@ilap
Copy link
Owner

ilap commented May 24, 2021

Uuugh, it's seems that Android's Java restricts the unsigned byte class to be implemented or extended.
Can you pls paste some more error messages, and let me know how to reproduce the issue as I did not tried this library with flutter.
Also, can you pls switch to stable channel?

@ilap
Copy link
Owner

ilap commented May 24, 2021

I think we're screwed.

dart-lang/sdk#45115

@ilap
Copy link
Owner

ilap commented May 24, 2021

Ok, I was able to do a dirty-refactoring in 30 minutes, but I need to think about which one is the right path.
Check https://github.com/ilap/pinenacl-dart/tree/sealed-class-restriction

@muriloventuroso
Copy link
Author

Wow, that was fast! I still haven't been able to fully test it, but it has already solved my problem, being able to do the build.
Everything seems to work again. I upgraded my app to null-safety and I used a package that was already abandoned. Your package fit perfectly.
It's late here, but tomorrow I'm going to do more tests.
Thanks for the package and for the quick response!

@ilap ilap closed this as completed Jul 4, 2021
@ilap
Copy link
Owner

ilap commented Jul 4, 2021

It was refactored and can be closed.

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

2 participants