templates/forwarder_templates library

Constants

classesDartApiDlForwarder → const String
dart_api_dl.c forwarder for CocoaPods Classes/ targets. Must be a .c file (not .cpp) so the void*/function-pointer casts inside dart_api_dl.c are accepted without C++ complaints.
classesIosDartApiDlForwarder → const String
dart_api_dl.c forwarder for CocoaPods ios/macos Classes/ targets with the comment explaining why it must remain .c.
classesMacosDartApiDlForwarder → const String
spmIosDartApiDlForwarder → const String
dart_api_dl.c forwarder for an iOS SPM C++ target. Uses the CocoaPods .symlinks path (valid in a pod install tree).
spmMacosDartApiDlForwarder → const String
dart_api_dl.c forwarder for a macOS SPM C++ target. Uses Flutter's macOS ephemeral .symlinks path.
srcDartApiDlInitForwarder → const String
dart_api_dl.c forwarder written into src/ during nitrogen init. Points to the monorepo placeholder path; nitrogen link rewrites it with the resolved pub-cache path after flutter pub get.

Functions

classesCForwarder(String pluginName) String
A CocoaPods-style Classes/plugin.c forwarder to src/plugin.c.
classesCppForwarder(String pluginName) String
A CocoaPods-style Classes/plugin.cpp forwarder to src/plugin.cpp. The relative path ../../src/ is correct from {platform}/Classes/.
managedBridgeMmForwarder(String relativePath) String
A nitrogen link managed .mm forwarder that wraps the generated C++ bridge so SPM compiles it as Obj-C++ and links the C ABI symbols.
managedCppForwarder(String relativePath) String
A nitrogen link managed C++ source forwarder — used in both CocoaPods Classes/ and SPM Sources/<Plugin>Cpp/ targets.
spmBridgeMmForwarder(String pluginName) String
A nitrogen init .mm forwarder for the SPM C++ target. The 4-level relative path is fixed for the nested SPM layout: {platform}/{plugin}/Sources/{Plugin}Cpp/lib/src/generated/cpp/
spmCppClassesForwarder(String pluginName) String
A nitrogen init C++ source forwarder in an SPM Cpp target. Points from <platform>/<plugin>/Sources/<Plugin>Cpp/ up to Classes/.