SBBSliverHeaderBoxLarge class
The large variant of SBBSliverHeaderBox.
This widget behaves like SBBSliverHeaderBox but uses the large header-box content layout and the themed SBBHeaderBoxThemeData.largeStyle.
The title row displays the icon besides the title and subtitle and a trailing widget. Additional body content is rendered below this area.
body can be a SBBContractible or an SBBCascadeColumn and will behave accordingly.
Provide either title for fully custom title content or titleText for a simple text title with standard styling. These parameters are mutually exclusive.
Optionally, provide either subtitle for fully custom subtitle content or subtitleText for a simple text subtitle with standard styling. These parameters are mutually exclusive.
Leading content can be supplied either as a custom widget via leading or as an icon via leadingIconData. These parameters are mutually exclusive.
Trailing content can be supplied via trailing.
When flap is provided, it is displayed below the header box as an attached extension area, appearing to be underneath the header box.
When isLoading is true, a loading indicator is displayed at the bottom of the header box.
Use semanticsLabel to provide an additional accessibility label announced by assistive technologies.
To achieve the resizing effect, this widget transitions between the minimum and maximum intrinsic heights of its subtree.
Sample code
SBBSliverHeaderBoxLarge(
leadingIconData: SBBIcons.train_small,
titleText: 'Journey details',
subtitleText: 'IC 3 to Zürich HB',
body: SBBContractible(
child: Padding(
padding: const EdgeInsets.only(top: SBBSpacing.small),
child: Text('Departure: 14:32'),
),
),
)
See also:
- SBBHeaderBoxLarge, for the normal RenderBox variant.
- SBBSliverHeaderBox, for the default variant.
- SBBHeaderBoxFlap, for flap content.
- SBBHeaderBoxStyle, for customizing the appearance.
- SBBHeaderBoxThemeData, for setting header box theme properties across your app.
- SBBCascadeColumn and SBBContractible, for ways to build contracting items.
- SBBSliverHeaderBoxSpacer, for a widget that should always come last in the list of slivers.
- Design Guidelines
- Figma design specs (internal only)
Limitations & Considerations
This widget makes heavy use of intrinsics. This means two things:
- It is relatively expensive, see IntrinsicHeight.
- You cannot use LayoutBuilder.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SBBSliverHeaderBox
- SBBSliverHeaderBoxLarge
Constructors
- SBBSliverHeaderBoxLarge({Key? key, Widget? leading, IconData? leadingIconData, Widget? title, String? titleText, Widget? subtitle, String? subtitleText, Widget? trailing, Widget? flap, bool isLoading = false, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, SBBHeaderBoxStyle? style, String? semanticsLabel, Widget? top})
-
const
Properties
- body → Widget?
-
A custom widget displayed as the body of the header box.
finalinherited
- config → SBBSliverHeaderBoxConfig?
-
A configuration for the sliver-specific behavior of the header box.
finalinherited
- flap → Widget?
-
The content to display inside the flap below the header box.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLoading → bool
-
Whether to show a loading indicator at the bottom of the header box.
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
A custom widget displayed as the header box's leading content.
finalinherited
- leadingIconData → IconData?
-
Icon data for the leading icon.
finalinherited
- margin → EdgeInsetsGeometry?
-
The empty space that surrounds the header box.
finalinherited
- padding → EdgeInsetsGeometry?
-
The empty space between the header box content and its outer container.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsLabel → String?
-
The semantic label for the header box announced by screen readers.
finalinherited
- style → SBBHeaderBoxStyle?
-
Customizes this header box's appearance.
finalinherited
- subtitle → Widget?
-
A custom widget displayed as the header box's subtitle below the title.
finalinherited
- subtitleText → String?
-
Text string to display as the header box's subtitle using standard styling.
finalinherited
- title → Widget?
-
A custom widget displayed as the header box's title.
finalinherited
- titleText → String?
-
Text string to display as the header box's title using standard styling.
finalinherited
- top → Widget?
-
A widget displayed above the header box that participates in the resize
motion when
config.resizingis enabled.finalinherited - trailing → Widget?
-
A custom widget displayed as the header box's trailing content.
finalinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
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