utils library

Functions

dedupeSharedSwiftDecls(String content, Set<String> alreadyDefined) String
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).
getAllProjects({Directory? baseDir}) List<ProjectInfo>
getGitBranch([String? workingDirectory]) Future<String>
getProjectInfo() ProjectInfo?
killBuildRunner({String? workingDirectory}) Future<int>
Kills any existing build_runner processes before starting a new one.
launchUrl(String url) → void
parsePubspec(Directory dir) ProjectInfo?
stripSharedSwiftPreamble(String content) String
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. platform is 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