I try to specify an entrypoint function in a specific file to launch a Flutter screen from my iOS APP, I follow the doc but get an error:
Dart Error: Dart_LookupLibrary: library 'hh.dart' not found.
This is my code in Xcode:
flutterEngine.run(withEntrypoint: "hhPage", libraryURI: "hh.dart")
and partial directory structure in the flutter module:
lib/
├─ main.dart
└─ hh.dart
The doc is not correct or out of date. According to the doc comment of libraryURI
argument, we need to specify a string including its package name, like "package:your_package/hh.dart".
flutterEngine.run(withEntrypoint: "hhPage", libraryURI: "package:your_package_name/hh.dart")
Additionally, hh.dart has to be imported in main.dart to contain the file in the app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With