Flutter Error: 'UnmodifiableUint8ListView' Is Restricted And Can't Be Extended Or Implemented

- 1 answer

I'm building a FLutter code that has the following error for both Android and IOS:

../../development/flutter/.pub-cache/hosted/ Error: 'UnmodifiableUint8ListView' is restricted and can't be extended or 

class Uuid extends UnmodifiableUint8ListView {

FAILURE: Build failed with an exception.

Flutter doctor status:

[✓] Flutter (Channel stable, 2.5.2, on macOS 11.6 20G165 darwin-arm, locale
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.61.0)
[✓] Connected device (2 available)

• No issues found!

The code has no problem on my second MAC.

Any idea how to solve this problem? I also attached the ymal file. The point is that this ymal file has no problem with the second MAC. And even when I am cloning the previous versions from Git, I am receiving the same error.



It might be related to breaking Dart changes

With your second mac you have upgraded your Flutter and dart. (Also packages)

Simple solution is to downgrade Flutter/Dart. How to downgrade Flutter SDK (Dart 1.x)

Or find which package is causing it and upgrade/remove it.