utils library
Functions
-
cleanEphemeralSymlinkCycles(
String projectRoot) → List< String> -
Removes ephemeral CocoaPods/Flutter symlink trees under
example/that can makebuild_runner buildhang forever with no error output and no CPU-idle signal (it looks identical to a slow build, just one that never finishes). -
Removes top-level shared declarations already defined by an earlier bridge
file compiled into the same Swift module, tracking what has been seen
cumulatively in
alreadyDefined(caller keeps one set per module). -
generatedHeaderStaleness(
String content, {required String specHash, String? generatorVersion}) → String? -
Why a generated file is stale given its header, or null when current.
Headers carry
nitro_generator: <version>and (since 0.7.4)spec-sha256: <hash>; a file without the hash line predates the stamp and must be regenerated once.generatorVersionnull skips that check (path dep — nothing to compare). -
getAllProjects(
{Directory? baseDir}) → List< ProjectInfo> -
getGitBranch(
[String? workingDirectory]) → Future< String> -
getProjectInfo(
) → ProjectInfo? -
killBuildRunner(
{String? workingDirectory}) → Future< int> -
Kills any existing
build_runnerprocesses before starting a new one. -
launchUrl(
String url) → void -
parsePubspec(
Directory dir) → ProjectInfo? -
selectProjectBuildRunnerPids(
Map< String, String> pidToCwd, String projectDir) → List<String> -
Selects the build_runner PIDs that belong to
projectDir. - Strips the shared public-type preamble from a Swift bridge file.
-
syncBridgeFiles(
String workingDirectory, {String platform = 'ios'}) → void -
Synchronizes generated bridge files from lib/src/generated to native project roots.
platformis the platform directory name ('ios' or 'macos'). Defaults to 'ios'. This is needed for Apple development as CocoaPods/SPM normally uses copies instead of symlinks. -
toPascalCase(
String s) → String