magic_starter library

Classes

EnsureAuthenticated
Middleware that redirects unauthenticated users to the login page.
MagicStarter
Static facade for Magic Starter.
MagicStarterAppLayout
Default App Layout for Magic Starter.
MagicStarterArtisanProvider
Magic Starter's contribution to the host application's artisan registry.
MagicStarterAuthController
Auth controller for Magic Starter plugin.
MagicStarterAuthFormCard
Consistent card wrapper for all auth forms.
MagicStarterAuthTheme
Theme configuration for authentication pages (login, register, forgot password, reset password) and their shared widgets.
MagicStarterAuthUser
Default authenticatable user for Magic Starter.
MagicStarterBillingController
Backs the billing screen: six independent reads of what a customer is entitled to, what they have spent, and where they manage it.
MagicStarterBillingView
The plan and billing screen.
MagicStarterCardTheme
Theme configuration for MSCard widget styling.
MagicStarterConfig
Feature toggle helper for Magic Starter.
MagicStarterConfirmDialog
Thin backwards-compatible alias for the migrated MSConfirmDialog component.
MagicStarterDialogShell
Thin backwards-compatible alias for the migrated MSDialog component.
MagicStarterForgotPasswordView
MagicStarterFormTheme
Theme configuration for form input styling across all Magic Starter views.
MagicStarterGuestAuthController
Controller managing guest authentication and device-ID-based upgrade flows.
MagicStarterGuestClaim
Moves what a guest accumulated onto the account they sign in to next.
MagicStarterGuestLayout
Default Guest Layout for Magic Starter.
MagicStarterHideBottomNav
Signals to MagicStarterAppLayout that the bottom navigation bar should be hidden for routes nested under this widget.
MagicStarterHideChrome
Signals to MagicStarterAppLayout that the whole shell chrome should be suppressed for routes nested under this widget.
MagicStarterLayoutTheme
Theme configuration for the app layout shell (MagicStarterAppLayout).
MagicStarterLoginView
Login view with dynamic identity field support.
MagicStarterManager
Manager for Magic Starter.
MagicStarterModalTheme
Theme configuration for modal/dialog colors and styling.
MagicStarterNavigationConfig
Configuration for app navigation sections.
MagicStarterNavigationTheme
Theme configuration for navigation colors and styling.
MagicStarterNavItem
Navigation item model for Magic Starter.
MagicStarterNewsletterController
Controller for newsletter subscription management.
MagicStarterOnboarding
A generic one-time gate for a first-run onboarding step.
MagicStarterOtpController
Controller managing the phone OTP authentication flow.
MagicStarterOtpVerifyView
Multi-step view for phone OTP authentication.
MagicStarterPageHeaderTheme
Theme configuration for MSPageHeader widget styling.
MagicStarterPasswordConfirmDialog
A reusable dialog widget that prompts the user to confirm their password.
MagicStarterPlan
A billing tier from a consumer app's plan catalogue, typed where the package can honestly name a field and left in raw where it cannot.
MagicStarterPlanCardScope
Publishes the catalogue row a plan card was built from, so the plan_card_highlight slot can render the fields this package never names.
MagicStarterProduct
One product in a catalogue tier row: the thing a purchase names.
MagicStarterProfileController
Profile controller for Magic Starter plugin.
MagicStarterProfileSettingsView
Profile settings view --- multi-section page for managing user profile.
MagicStarterRegisterView
Registration view with dynamic identity field support.
MagicStarterResetPasswordView
MagicStarterServiceProvider
Service provider for Magic Starter.
MagicStarterSocialAuth
The bridge between the starter's screens and an app's social login.
MagicStarterSocialButtons
One "Continue with" button per provider the social login bridge offers.
MagicStarterStepUpDialog
Asks an account with no password to prove who is calling.
MagicStarterTeam
Lightweight team DTO used by the starter plugin's team resolver.
MagicStarterTeamController
Team controller for Magic Starter plugin.
MagicStarterTeamCreateView
MagicStarterTeamInvitationAcceptView
MagicStarterTeamResolverConfig
Holds team-related callbacks so plugin UI can render team data without depending on app-specific models.
MagicStarterTeamSettingsView
MagicStarterTheme
Unified theme configuration that aggregates all Magic Starter sub-themes.
MagicStarterTimezoneSelect
Searchable timezone select widget for Magic Starter.
MagicStarterTokens
Semantic Token Alias Convention
MagicStarterTwoFactorChallengeView
The Two-Factor Authentication challenge page.
MagicStarterTwoFactorModal
A multi-step wizard modal widget for Two-Factor Authentication (2FA) setup.
MagicStarterViewRegistry
Registry for starter view builders.
MSAccordion
A recipe-driven accordion component for Magic Starter.
MSAccordionItem
A single item within an MSAccordion.
MSAvatar
The Shared Avatar
MSBadge
A small inline status label built on WBadge.
MSBottomSheet
A reusable bottom-sheet component with Wind UI chrome driven by MagicStarter.manager.modalTheme tokens.
MSButton
A reusable button component for Magic Starter views.
MSCard
A reusable card component for Magic Starter views.
MSCheckbox
A reusable checkbox component for Magic Starter forms.
MSCombobox<T>
A searchable single-select combobox component for Magic Starter.
MSDataColumn<E>
One column of an MSDataTable.
MSDataTable<E>
A table with a header and a body of rows.
MSDialog
A reusable dialog component providing consistent Wind UI chrome driven by MagicStarter.manager.modalTheme tokens.
MSDropdownMenu
A reusable dropdown-menu component that composes on WPopover.
MSDropdownMenuItem
A single item entry for MSDropdownMenu.
MSEmptyState
A centered empty-state placeholder with optional icon, title, description, and action slot.
MSErrorState
A centered error-state placeholder with destructive tone.
MSFormActions
The action row that closes a form: an optional cancel and the primary submit, right-aligned at the bottom of the fields.
MSFormField
A labeled form-field wrapper composing label / child / hint / error slots.
MSHeaderAction
A page-header action that becomes an icon-only control on a phone.
MSInput
A reusable text input component for Magic Starter forms.
MSKeyValueEditor
Controlled editor for an ordered list of key/value pairs.
MSKeyValueRow
A single editable key/value pair in a MSKeyValueEditor, e.g. one HTTP request header.
MSNavbar
A responsive top navigation bar.
MSPageContainer
The Shared Page Container
MSPageHeader
Reusable page header for Magic Starter views.
MSPageScaffold
The Shared Page Scaffold
MSRadio<T>
A reusable radio button component for Magic Starter forms.
MSSegmentedControl<T>
A tab-bar-style segmented control component for Magic Starter.
MSSelect<T>
A styled single-select dropdown component for Magic Starter.
MSSettingsNavRow
A drill-navigation row for iOS-style grouped settings lists.
MSSettingsRow
A single iOS-style settings list row.
MSSettingsSection
An iOS inset-grouped settings section.
MSSkeleton
A loading placeholder built on WDiv.
MSSocialDivider
Visual divider with "Or continue with" text.
MSStringValueList
Controlled editor for a short list of distinct strings.
MSSwitch
A reusable toggle switch component for Magic Starter forms.
MSSwitchRow
A labelled toggle: an MSSwitch with its text label beside it.
MSTabs
A recipe-driven tabs component for Magic Starter.
MSTeamSelector
Team selector widget.
MSTextarea
A reusable multiline text input component for Magic Starter forms.
MSToast
A reusable inline toast notification widget.
MSTooltip
A reusable tooltip component that wraps WPopover to display a brief label on hover (desktop) or long-press (mobile).
MSTypography
A polymorphic text component built on WText.
MSUpgradeDialog
Modal body shown when the backend refuses an action for plan reasons.
MSUpgradeNudge
Inline upsell shown where a plan limit bites.
MSUsageMeter
A single resource's usage against its plan limit.
MSUserProfileDropdown
A dropdown widget for the user profile.
PlanUpgradeRequirement
A refusal the team can fix by upgrading, read off a gated response.
RedirectIfAuthenticated
Middleware that redirects authenticated users away from guest-only pages.
UpgradePrompt
The one way a plan wall is surfaced to the user.

Enums

BadgeTone
Visual tone variants for MSBadge.
BillingCycle
How often a subscription is charged.
ButtonIntent
Visual intent variants for MSButton.
ButtonSize
Size variants for MSButton.
CardVariant
Visual style variants for MSCard.
ConfirmDialogVariant
Visual style variants for MSConfirmDialog.
GuestClaimOutcome
What one call to MagicStarterGuestClaim.claimIfPending settled.
InputState
Visual state variants for MSInput.
MagicStarterBillable
Which kind of subject a store purchase is billed to (magic_starter.billing.billable).
MagicStarterStorePurchaseOutcome
How a store purchase ended, for the screen to report.
OtpStep
Represents the two steps in the phone OTP authentication flow.
SegmentedControlSize
Visual size variants for MSSegmentedControl.
SettingsRowTone
Tone variants for MSSettingsRow.
SkeletonShape
Shape variants for MSSkeleton.
StringValueListTone
The visual tone of a MSStringValueList's chips; maps to the tone axis of stringValueListRecipe.
TextareaState
Visual state variants for MSTextarea.
ToastVariant
Visual style variants for MSToast.
TypographyVariant
Visual variants for MSTypography.
UsageMeterTone
Tone for a usage meter, tracking how close a resource is to its limit.

Constants

avatarRecipe → const WindRecipe
Builds the avatar WindRecipe.
badgeRecipe → const WindRecipe
Builds the badge WindRecipe using semantic tokens from MagicStarterTokens.
buttonRecipe → const WindRecipe
The button WindRecipe (const — no theme override hook needed for this component; styling is token-driven via semantic aliases).
checkboxRecipe → const WindRecipe
The checkbox WindRecipe (const).
The MSDropdownMenu disabled-item WindRecipe (const).
The MSDropdownMenu active-item WindRecipe (const).
The MSDropdownMenu popover-panel WindRecipe (const).
inputRecipe → const WindRecipe
The input WindRecipe (const — no theme override hook needed).
kBadgeToneAxis → const String
The tone axis key for the badge recipe (BadgeTone.<value>.name).
kBottomSheetSlotBody → const String
kBottomSheetSlotDescription → const String
kBottomSheetSlotFooter → const String
kBottomSheetSlotHeader → const String
kBottomSheetSlotPanel → const String
Slot keys for the MSBottomSheet component's Wind slot recipe.
kBottomSheetSlotTitle → const String
kButtonIntentAxis → const String
The intent axis key for the button recipe.
kButtonSizeAxis → const String
The size axis key for the button recipe.
kCardPaddingAxis → const String
The padding axis key for the card recipe (padded / noPadding).
kCardPaddingNoPadding → const String
The padding axis value for the full-bleed (no body padding) body.
kCardPaddingPadded → const String
The padding axis value for the default padded body.
kCardVariantAxis → const String
The variant axis key for the card recipe (CardVariant.<value>.name).
kDialogSlotBody → const String
kDialogSlotContainer → const String
Slot keys for the MSDialog component's Wind slot recipe.
kDialogSlotDescription → const String
kDialogSlotFooter → const String
kDialogSlotHeader → const String
kDialogSlotTitle → const String
keyValueEditorRecipe → const WindSlotRecipe
Builds the WindSlotRecipe for the MSKeyValueEditor component.
kInputStateAxis → const String
The state axis key for the input recipe.
kSettingsNavRowChevronClassName → const String
Trailing chevron icon className.
kSettingsNavRowIconClassName → const String
Leading icon className (the icon inside the tile).
kSettingsNavRowIconTileClassName → const String
Leading icon tile className (the colored square behind the icon).
kSettingsNavRowLayoutAxis → const String
The row layout axis key for the settings nav row recipe.
kSettingsNavRowLayoutDefault → const String
Single layout value — nav rows have one fixed layout.
kSettingsNavRowSubtitleClassName → const String
Subtitle className for the nav row.
kSettingsNavRowTitleClassName → const String
Title className for the nav row.
kSettingsNavRowValueClassName → const String
Trailing value className for the nav row.
kSettingsRowToneAxis → const String
The tone axis key for the settings row recipe (SettingsRowTone.<value>.name).
kSkeletonShapeAxis → const String
The shape axis key for the skeleton recipe (SkeletonShape.<value>.name).
kStringValueListToneAxis → const String
The tone axis key for the MSStringValueList recipe (StringValueListTone.<value>.name).
kTextareaStateAxis → const String
The state axis key for the textarea recipe.
kToastVariantAxis → const String
The variant axis key for the toast recipe (ToastVariant.<value>.name).
kTypographyVariantAxis → const String
The variant axis key for the typography recipe (TypographyVariant.<value>.name).
kUsageMeterToneAxis → const String
The tone axis key for usageMeterRecipe.
magicStarterVersion → const String
Version the starter:* command banners print.
radioIndicatorRecipe → const WindRecipe
The radio indicator WindRecipe (const).
radioShellRecipe → const WindRecipe
The radio shell WindRecipe (const).
settingsNavRowRecipe → const WindRecipe
The settings nav row WindRecipe.
settingsRowRecipe → const WindRecipe
The settings row WindRecipe.
skeletonRecipe → const WindRecipe
Builds the skeleton WindRecipe using semantic tokens.
stringValueListRecipe → const WindSlotRecipe
Builds the WindSlotRecipe for the MSStringValueList component.
switchRowLabelClassName → const String
The className the label inside a MSSwitchRow carries.
switchThumbRecipe → const WindRecipe
The switch thumb WindRecipe (const).
switchTrackRecipe → const WindRecipe
The switch track WindRecipe (const).
textareaRecipe → const WindRecipe
The textarea WindRecipe (const — no theme override hook needed).
tooltipPanelRecipe → const WindRecipe
The MSTooltip panel WindRecipe (const).
typographyRecipe → const WindRecipe
Builds the typography WindRecipe using semantic tokens.
upgradeDialogRecipe → const WindSlotRecipe
Builds the WindSlotRecipe for the MSUpgradeDialog component.
upgradeNudgeRecipe → const WindSlotRecipe
Builds the WindSlotRecipe for the MSUpgradeNudge component.
usageMeterRecipe → const WindSlotRecipe
Builds the WindSlotRecipe for the MSUsageMeter component.

Functions

accordionRecipe({Map<String, String?>? variants, Map<String, String>? classNames}) → Map<String, String>
Builds the slot recipe for MSAccordion from semantic tokens.
buildBottomSheetSlotRecipe(MagicStarterModalTheme theme) → WindSlotRecipe
Builds the bottom-sheet WindSlotRecipe from a MagicStarterModalTheme.
buildCardRecipe(MagicStarterCardTheme theme) → WindRecipe
Builds the card WindRecipe from a MagicStarterCardTheme.
buildDialogSlotRecipe(MagicStarterModalTheme theme) → WindSlotRecipe
Builds the dialog WindSlotRecipe from a MagicStarterModalTheme.
buildToastRecipe() → WindRecipe
Builds the toast WindRecipe using semantic tokens.
comboboxRecipe({Map<String, String?>? variants, Map<String, String>? classNames}) → Map<String, String>
Builds the slot recipe for MSCombobox from semantic tokens.
confirmAndRun(BuildContext context, MagicStarterProfileController controller, {required Future<bool> action(Map<String, String> proof), ConfirmDialogVariant variant = ConfirmDialogVariant.primary, String? title, String? description}) → Future<bool>
Confirms identity, then runs a gated action with the proof, inside the confirmation dialog.
confirmIdentity(BuildContext context, {ConfirmDialogVariant variant = ConfirmDialogVariant.primary, String? title, String? description, ValueListenable<List<String>?>? accepts, Future<String?> attempt(Map<String, String> proof)?}) → Future<Map<String, String>?>
Asks the signed-in user to prove who is calling, with the proof the backend accepts for that account, and answers it as request fields.
dataTableBodyClassName(int height) → String
Wrapper for the scrolling body in the paginated mode.
dataTableCellClassName() → String
Body cell className. Carries no track, for the reason above.
dataTableHeaderCellClassName() → String
Header cell className.
dataTableHeaderClassName() → String
Header row className.
dataTableLoadingFooterClassName() → String
ClassName for the tail row shown while the next page is in flight.
dataTableLoadingLabelClassName() → String
ClassName for that row's label.
dataTableRootClassName() → String
Root className for MSDataTable.
dataTableRowClassName() → String
Body row className.
dataTableScrollClassName() → String
The horizontal scroll wrapper, so a wide table scrolls as one unit.
dataTableTrackClassName(int? width, {required bool alignEnd}) → String
The className that puts a cell on its column's track.
emptyStateDescriptionClassName() → String
Description className.
emptyStateIconClassName() → String
Icon className.
emptyStateIconWrapClassName() → String
Icon wrapper className.
emptyStateRootClassName() → String
Root container className for MSEmptyState.
emptyStateTitleClassName() → String
Title className.
errorStateDescriptionClassName() → String
Description className.
errorStateIconClassName() → String
Icon className (destructive tone).
errorStateIconWrapClassName() → String
Icon wrapper className (destructive tinted background).
errorStateRootClassName() → String
Root container className for MSErrorState.
errorStateTitleClassName() → String
Title className (destructive tone).
formActionsRecipe() → WindRecipe
Builds the WindRecipe for the MSFormActions row.
formFieldErrorClassName() → String
Error text className (destructive tone).
formFieldHintClassName() → String
Hint text className.
formFieldLabelClassName() → String
Label text className.
formFieldRootClassName() → String
Builds the root-container className for MSFormField.
headerActionRecipe() → WindRecipe
Builds the WindRecipe for the MSHeaderAction component's icon-only form.
Brand slot container className.
Children (nav links) container className.
Root container className for MSNavbar.
Trailing slot container className.
pageContainerRecipe({required String hostClassName, String? className}) → String
Returns the className for the shared page container.
pageScaffoldChildrenAreaRecipe() → String
Returns the className for the children area (the page sections column).
pageScaffoldSurfaceRecipe() → String
Returns the className for the outermost page-surface wrapper.
registerMagicStarterAuthRoutes() → void
Registers auth routes provided by Magic Starter plugin.
registerMagicStarterNotificationRoutes() → void
Registers notification routes provided by Magic Starter plugin.
registerMagicStarterProfileRoutes() → void
Registers profile/settings routes provided by Magic Starter plugin.
registerMagicStarterTeamRoutes() → void
Registers team routes provided by Magic Starter plugin.
segmentedControlRecipe({Map<String, String?>? variants, Map<String, String>? classNames}) → Map<String, String>
Builds the slot recipe for MSSegmentedControl from semantic tokens.
selectRecipe({Map<String, String?>? variants, Map<String, String>? classNames}) → Map<String, String>
Builds the slot recipe for MSSelect from semantic tokens.
sessionDeviceTitle({required String platform, required String browser, required String app}) → String
Names the device behind one session row, or '' when nothing is known.
settingsSectionCaptionRecipe({String? className}) → String
Returns the className for the section header and footer caption text.
settingsSectionContainerRecipe({String? className}) → String
Returns the className for the grouped rounded container.
settingsSectionDividerRecipe() → String
Returns the className for the hairline divider inserted between child rows.
setUpMagicStarterForTests({MagicStarterManager? manager}) → void
Binds a MagicStarterManager into the Magic IoC container for tests.
switchRowRecipe() → WindRecipe
Builds the WindRecipe for the MSSwitchRow layout.
tabsRecipe({Map<String, String?>? variants, Map<String, String>? classNames}) → Map<String, String>
Builds the slot recipe for MSTabs from semantic tokens.

Typedefs

MagicStarterEntitlementSnapshot = ({DateTime? currentPeriodEnd, String? plan, String? product, BillingProvider provider})
The four entitlement facts a store purchase can move, read together.
MagicStarterLayoutBuilder = Widget Function(Widget child)
MagicStarterModalBuilder = Widget Function()
MagicStarterNumberFormat = String Function(int value)
Renders an integer the way the consumer's locale writes one.
MagicStarterRefusalAction = ({String label, Future<void> Function() run})
The one thing a refused account deletion offers to clear what blocks it.
MagicStarterSlotBuilder = Widget Function(BuildContext context)
Slot builder receives the current BuildContext and returns a widget.
MagicStarterStoreFundedTeamReader = Future<String?> Function()
Reads the NAME of another of the caller's teams that a store account already funds, or null when none does.
MagicStarterStoreIds = ({String? appStore, String? play})
The store product ids a catalogue product is sold as, one per store, each null when that store does not carry it.
MagicStarterTeamOwnershipReader = bool? Function()
Reads whether the signed-in user OWNS the team whose billing is on screen, or null when that is genuinely unresolved.
MagicStarterUsageCopy = List<UsageStat> Function(List<UsageStat> stats)
Pairs the consumer's display copy onto the usage stats the billing wire carries.
MagicStarterViewBuilder = Widget Function()
MagicStarterWebPrice = ({int amountMinor, String display})
One price the web rail charges for a product, in one currency.
UserModelFactory = Authenticatable Function(Map<String, dynamic> data)

Exceptions / Errors

MagicStarterSocialException
A social flow that did not conclude.