ExtendedSliverAppBar class

组合使用 FlexibleSpaceBarSliverAppBar bottom 添加PreferredSize 配合 ExtendedScrollView 使用 无需设置 expandedHeight

Inheritance
Available Extensions

Constructors

ExtendedSliverAppBar({Key? key, bool automaticallyImplyLeading = true, Widget? leading, double? leadingWidth, Widget? title, bool? centerTitle = true, List<Widget>? actions, Widget? bottom, Size bottomSize = const Size(double.infinity, kToolbarHeight), double? elevation, bool forceElevated = false, Widget? flexibleSpaceTitle, Widget? flexibleSpace, Widget? background, bool flexibleCenterTitle = true, EdgeInsetsGeometry? titlePadding, CollapseMode collapseMode = CollapseMode.pin, List<StretchMode> stretchModes = const <StretchMode>[StretchMode.zoomBackground], double? expandedHeight, Color? backgroundColor, IconThemeData? iconTheme, TextStyle? titleTextStyle, TextStyle? toolbarTextStyle, IconThemeData? actionsIconTheme, double? titleSpacing = NavigationToolbar.kMiddleSpacing, bool primary = true, SystemUiOverlayStyle? systemOverlayStyle, AsyncCallback? onStretchTrigger, bool pinned = false, bool floating = false, bool snap = false, bool stretch = true, double stretchTriggerOffset = 100, ShapeBorder? shape, double toolbarHeight = kToolbarHeight, double? collapsedHeight, Color? foregroundColor, Color? shadowColor, bool excludeHeaderSemantics = false})

Properties

actions List<Widget>?
A list of Widgets to display in a row after the title widget.
finalinherited
actionsIconTheme IconThemeData?
The color, opacity, and size to use for the icons that appear in the app bar's actions.
finalinherited
automaticallyImplyLeading bool
Controls whether we should try to imply the leading widget if null.
finalinherited
backgroundColor Color?
The fill color to use for an app bar's Material.
finalinherited
bottom PreferredSizeWidget?
This widget appears across the bottom of the app bar.
finalinherited
centerTitle bool?
Whether the title should be centered.
finalinherited
clipBehavior Clip?
The content will be clipped (or not) according to this option.
finalinherited
collapsedHeight double?
Defines the height of the app bar when it is collapsed.
finalinherited
elevation double?
The z-coordinate at which to place this app bar relative to its parent.
finalinherited
excludeHeaderSemantics bool
Whether the title should be wrapped with header Semantics.
finalinherited
expandedHeight double?
The size of the app bar when it is fully expanded.
finalinherited
flexibleSpace Widget?
This widget is stacked behind the toolbar and the tab bar. Its height will be the same as the app bar's overall height.
finalinherited
floating bool
Whether the app bar should become visible as soon as the user scrolls towards the app bar.
finalinherited
forceElevated bool
Whether to show the shadow appropriate for the elevation even if the content is not scrolled under the AppBar.
finalinherited
forceMaterialTransparency bool
Forces the AppBar's Material widget type to be MaterialType.transparency (instead of Material's default type).
finalinherited
foregroundColor Color?
The default color for Text and Icons within the app bar.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
iconTheme IconThemeData?
The color, opacity, and size to use for toolbar icons.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
A widget to display before the toolbar's title.
finalinherited
leadingWidth double?
Defines the width of AppBar.leading widget.
finalinherited
onStretchTrigger AsyncCallback?
The callback function to be executed when a user over-scrolls to the offset specified by stretchTriggerOffset.
finalinherited
pinned bool
Whether the app bar should remain visible at the start of the scroll view.
finalinherited
primary bool
Whether this app bar is being displayed at the top of the screen.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrolledUnderElevation double?
The elevation that will be used if this app bar has something scrolled underneath it.
finalinherited
shadowColor Color?
The color of the shadow below the app bar.
finalinherited
shape ShapeBorder?
The shape of the app bar's Material as well as its shadow.
finalinherited
snap bool
If snap and floating are true then the floating app bar will "snap" into view.
finalinherited
stretch bool
Whether the app bar should stretch to fill the over-scroll area.
finalinherited
stretchTriggerOffset double
The offset of overscroll required to activate onStretchTrigger.
finalinherited
surfaceTintColor Color?
The color of the surface tint overlay applied to the app bar's background color to indicate elevation.
finalinherited
systemOverlayStyle SystemUiOverlayStyle?
Specifies the style to use for the system overlays (e.g. the status bar on Android or iOS, the system navigation bar on Android).
finalinherited
title Widget?
The primary widget displayed in the app bar.
finalinherited
titleSpacing double?
The spacing around title content on the horizontal axis. This spacing is applied even if there is no leading content or actions. If you want title to take all the space available, set this value to 0.0.
finalinherited
titleTextStyle TextStyle?
The default text style for the AppBar's title widget.
finalinherited
toolbarHeight double
Defines the height of the toolbar component of an AppBar.
finalinherited
toolbarTextStyle TextStyle?
The default text style for the AppBar's leading, and actions widgets, but not its title.
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SliverAppBar>
Creates the mutable state for this widget at a given 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}) 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