Skip to content
Back to archipelago.banuacoder.com

Feature SDKs (Free)

introduction_sdk Free ​

Tier
Freeversion 2.0.4
Command
archipelago generate introduction_sdk
Generates
  • features/introduction
Depends on
auth_sdk, home_sdkgenerate these first

Introduction/onboarding feature with welcome, feature highlights, and get started pages.

What it is ​

A simple, UI-only onboarding flow (welcome → features → get-started) shown on first app launch, claiming the initial route ahead of other features via InitialPathClaim. Use it when a project needs a first-run walkthrough before landing on auth/home.

Unlike most feature bricks, introduction_sdk generates a single flat package — there is no _api/_impl split, because nothing else in the app needs to depend on its contract independently of its implementation.

Variables ​

VariableTypeDefaultDescription
appNamestringMyAppThe name of your application
prefixstringAppPrefix for generated UI component class names
uiKitPackageNamestringapp_ui_kitName of the UI kit package
isForMonorepobooleantrueWhether this will be part of a monorepo structure

Usage ​

Interactive ​

bash
archipelago generate introduction_sdk

Non-interactive (CI) ​

bash
archipelago generate introduction_sdk --config my_config.json

Generated Structure ​

text
features/
└── introduction/
    ├── README.md
    ├── build.yaml
    ├── lib/
    │   ├── introduction.dart
    │   └── src/
    │       ├── introduction_sdk.dart          # IntroductionSDK + IntroductionSDKImpl
    │       ├── di/
    │       │   └── introduction_global_module.dart
    │       ├── presentation/
    │       │   ├── introduction_shell_page.dart
    │       │   ├── welcome_page.dart
    │       │   ├── features_page.dart
    │       │   └── get_started_page.dart
    │       └── router/
    │           └── introduction_router.dart
    └── pubspec.yaml

Public API ​

dart
abstract interface class IntroductionSDK() {
  bool get isCompleted;
  Future<void> launch(BuildContext context);
  void markIntroductionCompleted();
  void skipIntroduction();  // convenience — calls markIntroductionCompleted()
}
dart
final completed = getIt<IntroductionSDK>().isCompleted;
await getIt<IntroductionSDK>().launch(context); // replaceAll to the introduction shell

IntroductionManifest declares the routes and claims /introduction via InitialPathClaim(priority: 10, resolve: () => isCompleted() ? null : '/introduction'). Priority 10 is checked first, so onboarding wins until it is completed.

DI and wiring ​

  • IntroductionGlobalModule registers IntroductionManifest with FeatureSDKRegistry and IntroductionSDK as a lazy singleton. The manifest's claim reads isCompleted through a provider closure, so the SDK is built when the router resolves the initial path, not when the manifest is registered.
  • post_gen.dart adds features/introduction to the Dart workspace, adds a path dependency to the host app's pubspec.yaml, and registers IntroductionGlobalModule into lib/di/injector.dart via ServiceLocatorUpdater. It records the brick as installed in archipelago.yaml.

Limitations ​

  • Completion state is not persisted. IntroductionSDKImpl._hasCompleted is an in-memory bool only — initialize() and markIntroductionCompleted() both carry // TODO(user): comments to load/save it via a preferences service that the brick does not generate. As shipped, a user who completes onboarding sees it again on every cold start. Wire persistence yourself (e.g. through storage_sdk) before shipping.
  • Hard dependencies on auth_sdk and home_sdk, not self-generated. pubspec.yaml declares auth_api (../auth/auth_api) and home_api (../home/home_api) path dependencies; WelcomePage/GetStartedPage call AuthSDK.requireAuthentication() and HomeSDK.goToHome(). pre_gen does not run SubBrickGenerator for them, so standalone generation without those bricks yields an unresolvable workspace. flutter_modular_monorepo avoids this by expanding starterFeatures to its dependency closure.

Changelog ​

Run archipelago brick info introduction_sdk to see the latest published version. Enterprise customers can read the full CHANGELOG.md in the brick source repository.