cli/scaffold_cli library

Classes

PatchedManifest
The result of patchAndroidManifestForSuperwall: the (possibly unchanged) XML and a tag describing what happened, so the runtime can decide whether to write the file back and what to print to the user.
SlatePlan
The output of a planner: a deterministic description of what the CLI intends to do for the chosen backend/service.

Enums

AndroidManifestPatchResult
Outcome of trying to inject the Superwall activity into a manifest.

Constants

androidRevenueCatKeyPrompt → const String
androidSuperwallKeyPrompt → const String
appleRevenueCatKeyPrompt → const String
appleSuperwallKeyPrompt → const String
laravelUrlPrompt → const String
supabaseAnonKeyPrompt → const String
supabaseUrlPrompt → const String
superwallAndroidActivityXml → const String
The <activity> element Superwall's install docs ask developers to register inside <application> in android/app/src/main/AndroidManifest.xml. The plugin's bundled manifest declares it too, but with Theme.AppCompat.NoActionBar; injecting this here lets the consumer's app override that with the docs-recommended Theme.MaterialComponents.DayNight.NoActionBar (main-app manifest wins on attribute conflicts via Gradle manifest-merger priority).
supportedAuthBackends → const List<String>
Backend choices presented to the user for dart run scaffold_ui:main auth.
supportedIapServices → const List<String>
Service choices presented to the user for dart run scaffold_ui:main iap.

Functions

iosSetupHintFor({required bool appleKeyProvided}) String
The post-install hint printed at the end of a RevenueCat run. Returns the empty string when no Apple key was provided (the user picked n), so the hint is silently omitted for Android-only setups. Pulled out of iap() so the conditional is testable.
parseCommand(List<String> args) String?
Validates the CLI invocation and returns the parsed command name (auth or iap). Returns null for any other shape — the caller is responsible for printing a usage hint and exiting with a non-zero status code.
patchAndroidManifestForSuperwall(String manifestContent) PatchedManifest
Idempotently inserts superwallAndroidActivityXml just after the opening <application ...> tag in manifestContent. Pure — does no IO so it can be unit-tested against canned manifest strings.
planAuthSlate({required String backend, required Prompt prompt}) SlatePlan?
Builds the slate plan for an auth invocation. Pure: the only side effect is calling prompt (which the runtime backs with CliDialog.ask()).
planIapSlate({required String service, required Prompt prompt}) SlatePlan?
Builds the slate plan for an iap invocation. Mirrors planAuthSlate in shape; for RevenueCat and Superwall the user can type n to skip a platform key, which is normalised to the empty string (the stub treats '' as "leave the configure line commented out with placeholder text").
superwallAndroidSetupHintFor({required bool androidKeyProvided}) String
Superwall-specific Android hint. The runtime auto-injects the SuperwallPaywallActivity per Superwall's install docs, so the only thing the consumer must do manually is raise minSdkVersion to 26 — Flutter's historical default of 21 fails the build.
superwallIosSetupHintFor({required bool appleKeyProvided}) String
Superwall-specific iOS hint. Mirrors iosSetupHintFor but adds the iOS 14.0+ deployment-target requirement (Superwall's documented minimum). Empty when no Apple key was provided so Android-only projects don't see noisy iOS guidance.

Typedefs

Prompt = String Function(String question)
Callback used by the planners to read a single line of user input. The runtime wires this to a CliDialog text question; tests substitute a canned-answer recorder.