flutpak
library
Constants
builtinSharedShPatch
→ const String
Patch content to replace pub upgrade with pub get --offline inside
Flutter's shared.sh bootstrap function. Applied automatically when no
explicit patchPath is given to FlutterSdkGenerator .
defaultSharedShPatchPath
→ const String
Default relative path (from the output dir) where the built-in patch is
written when no explicit patchPath is provided.
Functions
buildLockPaths ({required List <String > effectiveLocks , required List <String > cargoLockPaths , required List <String > rustLocks , required String baseDir })
→ ({List <String > allCargoLockPaths , List <String > allPubLockPaths } )
Merges effective pub locks with extra pubspec paths from the registry and
cargo lock paths from the registry + explicit config entries.
convertPatchToCrlf (String content )
→ String
Converts content (a unified diff) to CRLF line endings.
convertPatchToLf (String content )
→ String
Converts content (a unified diff) to LF line endings.
injectGeneratedContent ({required String content , required ManifestConfig manifestCfg , required String sourcesPath , String ? cargoSourcesPath , String ? flutterSdkModule , String ? rustupModule , String ? rustupPath , required String ? tag , required String ? commit })
→ String
Injects tag/commit, modules, sources, and Rust/Cargo artifacts into the
manifest YAML using yaml_edit.
patchHasLfLineEndings (String content )
→ bool
Returns true if content contains at least one bare \n not preceded by
\r, i.e. the string has LF line endings.
patchMetainfoReleases (String content , String tag , DateTime date )
→ String
Updates the first <release .../> entry inside <releases> in a
metainfo XML file.
replaceMetainfoScreenshots (String content , {required List <ScreenshotConfig > screenshots , required String repoSlug , required String ref })
→ String
Pins screenshot URLs in a metainfo XML file from /main/ to ref.
Replaces the entire <screenshots> block in content with one built
from screenshots config, using repoSlug and ref for URLs.
resolveFlutterRef (String ? ref , {Client? client })
→ Future <String >
Resolves a symbolic Flutter ref to a concrete version tag.
stripTemplateGuidance (String content )
→ String
Strips template-only guidance comments from content before writing the
generated manifest.