PaymentSheet class

Layout for bottom sheets and side panels: a fixed header, a body that scrolls when it is taller than the space, and a fixed footer for actions. Respects the safe area and moves above the software keyboard.

As the direct body of showPaymentSideSheet, it fills the panel. In a bottom sheet the default constructor hugs its content unless height is set. PaymentSheet.scrollable gives a caller-owned scrollable the remaining space directly.

Inheritance

Constructors

PaymentSheet({Key? key, Widget? header, required Widget body, Widget? footer, double? height})
Wraps body in a scroll view with the sheet's standard gutters.
const
PaymentSheet.scrollable({Key? key, Widget? header, required Widget body, Widget? footer, double? height})
Gives body a finite viewport without wrapping it in a scroll view or adding gutters. Pass a ListView or CustomScrollView and set its padding as needed. Without height, the parent must bound the height. When a keyboard leaves a short, wide viewport, the header and footer move beside the body to leave room for editing.
const

Properties

body → Widget
The content to scroll, or the scrollable itself in PaymentSheet.scrollable.
final
Optional fixed actions below the scrolling body.
final
hashCode → int
The hash code for this object.
no setterinherited
Optional fixed content above the scrolling body.
final
height → double?
Requested height in logical pixels, excluding the keyboard inset and route drag handle. Must be finite and positive, with room for the header and footer. Parent constraints can limit it or require the sheet to fill the panel.
final
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

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