Topsheet class
A customizable topsheet widget that can be used across the app.
This widget creates a curved container at the top of the screen with optional greeting, header, and subheader text.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- Topsheet
Constructors
- Topsheet.new({Key? key, bool? isBackButtonEnabled, String? greetingIconPath, String? greetingText, required String headerText, String? subheaderText, bool preserveHeaderLineBreaks = true, Color? backgroundColor, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(vertical: 56, horizontal: 24.0), Widget? customContent})
-
const
Properties
- backgroundColor → Color?
-
Optional color for the background. If not provided, uses the theme's secondary color.
final
- customContent → Widget?
-
Optional custom widget to display instead of the default header/subheader
final
- greetingIconPath → String?
-
Optional greeting icon path (SVG)
final
- greetingText → String?
-
Optional greeting text to show next to the icon
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerText → String
-
The main header text displayed in the topsheet
final
- isBackButtonEnabled → bool?
-
Optional back button
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- padding → EdgeInsetsGeometry
-
Optional padding for the entire topsheet content
final
- preserveHeaderLineBreaks → bool
-
Whether the header text should have line breaks preserved
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subheaderText → String?
-
Optional subheader or description text
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