FixedOnScrollAppbar class
A CustomAppBar widget displaying an app bar.
Only if the corresponding ScrollController property registers a scroll action, the app bar will be shown by playing its animation forward. If the scroll offset is below the threshold (scroll up), the app bar will be animated in reverse, therefore removing it from the visible area.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FixedOnScrollAppbar
- Implemented types
Constructors
-
FixedOnScrollAppbar({Key? key, required ScrollController? scrollController, double maxScrollOffset = 50.0, Color backgroundColor = Colors.white, List<
BoxShadow> boxShadow = const [BoxShadow(color: Colors.black26, blurRadius: 12.0, offset: Offset(0, 2), spreadRadius: 1.0)], double height = CustomAppBar.height, required String title, EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 8.0), Color backButtonBackgroundColor = LitBackButtonDefaultStyling.backgroundColor, Color backButtonIconColor = LitBackButtonDefaultStyling.iconColor, }) -
Creates a FixedOnScrollAppbar widget.
The ScrollController is required in order to register a scroll change.
const
Properties
- backButtonBackgroundColor → Color
-
final
- backButtonIconColor → Color
-
final
- backgroundColor → Color
-
The background color of the app bar. It defaults to Colors.white.
final
-
boxShadow
→ List<
BoxShadow> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
The height of the app bar. It defaults to CustomAppBar.height.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxScrollOffset → double
-
The offset required to trigger the app bar to appear. It defaults to 50.0.
final
-
final
- padding → EdgeInsets
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
The ScrollController's scroll offset will state whether to animate the app bar.
final
-
final
- title → String
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _FixedOnScrollAppbarState -
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}) → 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