[SOLVED] Type ’UnmodifiableUint8ListView’ not found. final UnmodifiableUint8ListView bytes

In this article, we are going to show you how to solve "Type 'UnmodifiableUint8ListView' not found.   final UnmodifiableUint8ListView bytes" error in Flutter. This error occurs when you upgrade Flutter SDK to latest version. See the solution below:

/Users/hpc/.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:31:9: Error: Type 'UnmodifiableUint8ListView' not found.
  final UnmodifiableUint8ListView bytes;
        ^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/hpc/.pub-cache/hosted/pub.dev/get-4.6.5/lib/get_navigation/src/extension_navigation.dart:222:62: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'.
 - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../flutter_sdk/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'backgroundColor'.
                  TextStyle(color: confirmTextColor ?? theme.backgroundColor),
                                                             ^^^^^^^^^^^^^^^
/Users/hpc/.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:31:9: Error: 'UnmodifiableUint8ListView' isn't a type.
  final UnmodifiableUint8ListView bytes;
        ^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/hpc/.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:51:17: Error: Method not found: 'UnmodifiableUint8ListView'.
    return Guid(UnmodifiableUint8ListView(guid));
                ^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/hpc/.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:55:31: Error: Method not found: 'UnmodifiableUint8ListView'.
  factory Guid.zero() => Guid(UnmodifiableUint8ListView(Uint8List(16)));
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/hpc/.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:99:17: Error: Method not found: 'UnmodifiableUint8ListView'.
    return Guid(UnmodifiableUint8ListView(Uint8List.fromList(guidAsBytes)));
                ^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/hpc/.pub-cache/hosted/pub.dev/archive-3.4.9/lib/src/bzip2/bzip2.dart:5:7: Error: Method not found: 'UnmodifiableUint8ListView'.
      UnmodifiableUint8ListView(Uint8List(0));
      ^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/hpc/.pub-cache/hosted/pub.dev/archive-3.4.9/lib/src/bzip2/bzip2.dart:7:7: Error: Method not found: 'UnmodifiableUint32ListView'.
      UnmodifiableUint32ListView(Uint32List(0));
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/hpc/.pub-cache/hosted/pub.dev/archive-3.4.9/lib/src/bzip2/bzip2.dart:9:7: Error: Method not found: 'UnmodifiableInt32ListView'.
      UnmodifiableInt32ListView(Int32List(0));
      ^^^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot_program failed: Exception

To solve this issue, you have to clean the package cache, and upgrade all the packages to latest version. To do so, hit the command on terminal at your project folder.

flutter pub cache clean
flutter pub get
flutter pub upgrade

Now, run your flutter project, it is solved now. 

In this way, you can solve this issue on your Flutter project. 

No any Comments on this Article


Please Wait...