If you try to run with Dart SDK > 3.0, you get the following error:
../../.pub-cache/hosted/pub.dev/dargon2-3.2.1/lib/src/native/dart_lib_loader.dart:34:20: Error: The method 'waitFor' isn't defined for the type 'DartLibLoader'.
dart_lib_loader.dart:34
- 'DartLibLoader' is from 'package:dargon2/src/native/dart_lib_loader.dart' ('../../.pub-cache/hosted/pub.dev/dargon2-3.2.1/lib/src/native/dart_lib_loader.dart').
Try correcting the name to the name of an existing method, or defining a method named 'waitFor'.
var rootPath = waitFor(Isolate.resolvePackageUri(Uri.parse(rootLibrary)))!
^^^^^^^
Exited (254).