commands/init_command
library
Functions
-
declarePlatformsInPubspec(String pubspec, List<String> platforms)
→ String
-
Declares
platforms under a top-level platforms: key, which is how a
plugin with a web target tells pub.dev what it supports.
-
updateCMakeNitroNative(String content, String newPath)
→ String
-
Replaces the
set(NITRO_NATIVE "...") line in content with newPath.
Returns the updated content. If no such line exists, returns content unchanged.
Idempotent — running twice produces the same result, no duplicates.
-
withNitroSdkFloor(String pubspec)
→ String
-
Replaces the
environment: sdk: constraint flutter create stamps (the
SDK that happened to run it) with kNitroDartSdkFloor. The stamped one
shuts out older Flutter releases and DartNative, which ships an earlier
Dart, though nothing in a Nitro plugin needs the newer SDK.