BankPaywallSheet class
Upsell bottom sheet shown when a free-tier user attempts to access a paid-only feature.
Present with BankPaywallSheet.show or push an instance via showModalBottomSheet directly.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BankPaywallSheet
Constructors
-
BankPaywallSheet({required String featureName, required String description, required List<
BankPlanTier> plans, Key? key, String? currentTierId, ValueChanged<BankPlanTier> ? onUpgrade, VoidCallback? onDismiss, EdgeInsetsGeometry? padding, BorderRadius? radius, Color? backgroundColor, Color? accentColor, List<BoxShadow> ? cardShadow, IconData? headerIcon, TextStyle? titleStyle, TextStyle? descriptionStyle, String headlineTemplate = 'Upgrade to access {feature}', String dismissLabel = 'Maybe later', String upgradeLabel = 'Upgrade', String currentPlanLabel = 'Current plan', String perMonthLabel = '/mo', Widget? header, String? semanticLabel}) -
const
Properties
- accentColor → Color?
-
Overrides the header icon tint and the fallback plan accent.
Defaults to the theme primary.
final
- backgroundColor → Color?
-
Overrides the sheet background color. Defaults to the theme surface.
final
-
cardShadow
→ List<
BoxShadow> ? -
Overrides the plan-card shadow. Defaults to a soft black drop
shadow; pass
const []to flatten.final - currentPlanLabel → String
-
Text shown instead of the button on the current plan. Defaults to
'Current plan'.final - currentTierId → String?
-
final
- description → String
-
final
- descriptionStyle → TextStyle?
-
Merged over the description style (BankTokens.bodyMedium in
onSurfaceVariant).
final
- dismissLabel → String
-
Label of the dismiss button. Defaults to
'Maybe later'.final - featureName → String
-
final
-
Slot rendered below the dismiss button. Hidden when null.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Slot rendered above the header icon. Hidden when null.
final
- headerIcon → IconData?
-
Glyph inside the circular header badge. Defaults to
Icons.star_rounded.
final
- headlineTemplate → String
-
Headline text; every
{feature}occurrence is replaced with featureName. Defaults to'Upgrade to access {feature}'.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDismiss → VoidCallback?
-
final
-
onUpgrade
→ ValueChanged<
BankPlanTier> ? -
final
- padding → EdgeInsetsGeometry?
-
Overrides the sheet content padding. Defaults to space4 sides and
bottom with a space6 top.
final
- perMonthLabel → String
-
Suffix rendered after each monthly price. Defaults to
'/mo'.final -
plans
→ List<
BankPlanTier> -
final
- radius → BorderRadius?
-
Overrides the sheet corner radius. Defaults to the theme sheetRadius.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
Overrides the sheet semantics label. Defaults to
'Upgrade required to access <featureName>'.final - titleStyle → TextStyle?
-
Merged over the headline style (BankTokens.headlineSmall in
onSurface).
final
- upgradeLabel → String
-
Label of the per-plan upgrade button. Defaults to
'Upgrade'.final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
show(
BuildContext context, {required String featureName, required String description, required List< BankPlanTier> plans, String? currentTierId, ValueChanged<BankPlanTier> ? onUpgrade, VoidCallback? onDismiss, EdgeInsetsGeometry? padding, BorderRadius? radius, Color? backgroundColor, Color? accentColor, List<BoxShadow> ? cardShadow, IconData? headerIcon, TextStyle? titleStyle, TextStyle? descriptionStyle, String headlineTemplate = 'Upgrade to access {feature}', String dismissLabel = 'Maybe later', String upgradeLabel = 'Upgrade', String currentPlanLabel = 'Current plan', String perMonthLabel = '/mo', Widget? header, String? semanticLabel}) → Future<void>