Problem adding package from pub.dev

I'm trying to add this package to my FlutterFlow app as a Custom Action.

https://pub.dev/packages/realm

The latest version is 1.5.0 but I have to downgrade 2 versions before I get near to being able to compile. If I use the 1.2.0 version, it fails to compile but little indication of what is wrong. Hovering over the red X it says unknown error and tapping the red X shows an empty dialog where error messages would be. The error issue shown at the top says the often-seen "Unknown error compiling custom code. A common cause is a custom widget or action whose name in the code does not match the name provided in the editor." The name does match.

Could the problem be that I need to add all of the dependencies shown at pub.dev? I tried this last week, and trying to add many leads to conflicts of version numbers. These are the dependencies:

args, build_cli_annotations, build_runner, cancellation_token, collection, crypto, ffi, flutter, http, json_annotation, logging, meta, package_config, path, pub_semver, pubspec_parse, realm_common, realm_generator, tar

4 replies