MigrationTipView class
Embeds the native iOS migration tip view (MigrationTipView from
ZeroSettleKit) inside a Flutter app.
The native SwiftUI view is intrinsically self-sizing — its height changes
based on event state (CTA swap when Apple Pay needs setup, dismissal,
loading state, etc.). A fixed SizedBox would either clip taller content
or reserve dead space when the view collapses.
This widget subscribes to a per-view MethodChannel that the native
container pushes size updates to whenever its layoutSubviews() fires.
Flutter rebuilds with the new height, so the surrounding layout always
matches the actual rendered content.
Renders nothing on Android.
Example:
MigrationTipView(
userId: 'user123',
backgroundColor: Theme.of(context).colorScheme.primary,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MigrationTipView
Constructors
- MigrationTipView({Key? key, required String userId, Color backgroundColor = const Color(0xFF000000)})
-
const
Properties
- backgroundColor → Color
-
Used as both the card fill AND the CTA text color on the native view
(the CTA button background is hardcoded white). Pass a saturated brand
color, not a neutral surface — white-on-white text won't render.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userId → String
-
The user ID to pass to the native SDK.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MigrationTipView> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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