paywall_sdk Free
Paywall feature SDK with pricing UI, mock purchase flow, and subscription management.
Version: 1.0.0
Variables
| Variable | Type | Default | Description |
|---|---|---|---|
| appName | string | MyApp | The name of your application |
| prefix | string | App | Prefix for generated classes (e.g. App, My) |
| uiKitPackageName | string | app_ui_kit | Name of the UI kit package |
| isForMonorepo | boolean | true | Whether this will be part of a monorepo structure |
| stateManagement | enum | cubit | State management solution: bloc, cubit, riverpod, provider |
Usage
Interactive
bash
archipelago generate paywall_sdkNon-interactive (CI)
bash
archipelago generate paywall_sdk --config my_config.jsonConfig Template
json
{
"@appName": "The name of your application",
"appName": "MyApp",
"@isForMonorepo": "Whether this will be part of a monorepo structure",
"isForMonorepo": true
}Generated Structure
features/
└── paywall/
├── paywall_api/
│ ├── README.md
│ ├── lib/
│ │ ├── paywall_api.dart
│ │ └── src/
│ │ ├── paywall_event.dart
│ │ ├── paywall_product.dart
│ │ ├── paywall_sdk.dart # Paywall FeatureSDK contract
│ │ ├── purchase_result.dart
│ │ ├── subscription_status.dart
│ │ ├── subscription_tier.dart
│ │ └── typedefs.dart
│ └── pubspec.yaml
└── paywall_impl/
├── README.md
├── lib/
│ ├── paywall_impl.dart
│ └── src/
│ ├── paywall_sdk_impl.dart
│ ├── data/
│ │ ├── datasources/
│ │ │ └── paywall_datasource.dart
│ │ └── repositories/
│ │ ├── paywall_repository.dart
│ │ └── paywall_repository_impl.dart
│ ├── di/
│ │ ├── injector.config.dart
│ │ ├── injector.dart
│ │ ├── paywall_global_module.dart
│ │ └── paywall_local_module.dart
│ ├── domain/
│ │ └── usecases/
│ │ ├── get_products_usecase.dart
│ │ └── purchase_usecase.dart
│ ├── presentation/
│ │ ├── paywall_page.dart
│ │ └── paywall_shell_page.dart
│ └── router/
│ ├── paywall_router.dart
│ └── paywall_router.gr.dart
└── pubspec.yamlState Management
The brick generates state management files based on the stateManagement variable passed from the parent flutter_modular_monorepo brick. Supported values: bloc, cubit, riverpod, provider.
Derived boolean variables computed in pre_gen.dart:
isBloc— true whenstateManagement == blocisCubit— true whenstateManagement == cubitusesBloc— true whenisBloc || isCubit(both useflutter_bloc)isRiverpod— true whenstateManagement == riverpodisProvider— true whenstateManagement == provider
Pages use typed design system extensions (context.colors, context.typography, etc.) instead of Theme.of(context).