jonataslaw / get_cli

Official Getx CLI
Apache License 2.0
576 stars 164 forks source link

build issue in dart 3.5.0 - UnmodifiableUint8ListView #263

Open hashinclude72 opened 2 weeks ago

hashinclude72 commented 2 weeks ago
Building package executables... (5.4s)
Failed to build get_cli:get:
../../../.pub-cache/hosted/pub.dev/win32-5.3.0/lib/src/guid.dart:32:9: Error: Type 'UnmodifiableUint8ListView' not found.
  final UnmodifiableUint8ListView bytes;
        ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-5.3.0/lib/src/guid.dart:32:9: Error: 'UnmodifiableUint8ListView' isn't a type.
  final UnmodifiableUint8ListView bytes;
        ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-5.3.0/lib/src/guid.dart:52:17: Error: Method not found: 'UnmodifiableUint8ListView'.
    return Guid(UnmodifiableUint8ListView(guid));
                ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-5.3.0/lib/src/guid.dart:56:31: Error: Method not found: 'UnmodifiableUint8ListView'.
  factory Guid.zero() => Guid(UnmodifiableUint8ListView(Uint8List(16)));
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-5.3.0/lib/src/guid.dart:100:17: Error: Method not found: 'UnmodifiableUint8ListView'.
    return Guid(UnmodifiableUint8ListView(Uint8List.fromList(guidAsBytes)));
                ^^^^^^^^^^^^^^^^^^^^^^^^^
yanashenyang commented 1 week ago

same same

/../.pub-cache/hosted/pub.dev/win32-5.5.0/lib/src/guid.dart:32:9: Error: Type 'UnmodifiableUint8ListView' not found. 20:46:14 final UnmodifiableUint8ListView bytes; 20:46:14 ^^^^^^^^^^^^^^^^^^^^^^^^^ 20:46:19 ../../.pub-cache/hosted/pub.dev/win32-5.5.0/lib/src/guid.dart:32:9: Error: 'UnmodifiableUint8ListView' isn't a type. 20:46:19 final UnmodifiableUint8ListView bytes; 20:46:19 ^^^^^^^^^^^^^^^^^^^^^^^^^ 20:46:19 ../../.pub-cache/hosted/pub.dev/win32-5.5.0/lib/src/guid.dart:52:17: Error: Method not found: 'UnmodifiableUint8ListView'. 20:46:19 return Guid(UnmodifiableUint8ListView(guid)); 20:46:19 ^^^^^^^^^^^^^^^^^^^^^^^^^ 20:46:19 ../../.pub-cache/hosted/pub.dev/win32-5.5.0/lib/src/guid.dart:56:31: Error: Method not found: 'UnmodifiableUint8ListView'. 20:46:19 factory Guid.zero() => Guid(UnmodifiableUint8ListView(Uint8List(16))); 20:46:19 ^^^^^^^^^^^^^^^^^^^^^^^^^ 20:46:19 ../../.pub-cache/hosted/pub.dev/win32-5.5.0/lib/src/guid.dart:100:17: Error: Method not found: 'UnmodifiableUint8ListView'. 20:46:19 return Guid(UnmodifiableUint8ListView(Uint8List.fromList(guidAsBytes))); 20:46:19 ^^^^^^^^^^^^^^^^^^^^^^^^^ 20:46:24 Target kernel_snapshot_program failed: Exception 20:46:24

deveshm commented 1 week ago

This is due to Uint8ListView being deprecated (https://github.com/dart-lang/sdk/issues/45115)

The latest version of win32 package should work though

Try flutter pub upgrade win32

shubhh123 commented 4 days ago

This still isn't solving the issue :(

deveshm commented 4 days ago

You can also try switching to stable version of flutter as that is connected to Dart version 3.4.3 currently (whereas master is connected to Dart 3.5.0)

You can switch by running flutter channel stable

ynhi0711 commented 3 days ago

I've got the same issue, and it has been resolved by switching to the stable channel, flutter channel stable. Thanks @deveshm for your answer

shubhh123 commented 19 hours ago

This works!! Thank you very much :)

sajidshaikh20 commented 18 hours ago

I've have same issue follow this step flutter pub cache clean flutter channel stable flutter pub get so problem has resolved