DraggableHome class

Inheritance

Constructors

DraggableHome({Key? key, Widget? leading, required Widget title, bool centerTitle = true, List<Widget>? actions, bool alwaysShowLeadingAndAction = false, bool alwaysShowTitle = false, double headerExpandedHeight = 0.35, required Widget headerWidget, Widget? headerBottomBar, Color? backgroundColor, Color? appBarColor, double curvedBodyRadius = 20, required List<Widget> body, Widget? drawer, bool fullyStretchable = false, double stretchTriggerOffset = 200, Widget? expandedBody, double stretchMaxHeight = 0.9, Widget? bottomSheet, double? bottomNavigationBarHeight = kBottomNavigationBarHeight, Widget? bottomNavigationBar, Widget? floatingActionButton, FloatingActionButtonLocation? floatingActionButtonLocation, FloatingActionButtonAnimator? floatingActionButtonAnimator, ScrollPhysics? physics, ScrollController? scrollController})
This will create DraggableHome.
const

Properties

actions List<Widget>?
Action: A list of Widgets to display in a row after the title widget.
final
alwaysShowLeadingAndAction bool
Always Show Leading And Action : This make Leading and Action always visible. Default value is false.
final
alwaysShowTitle bool
Always Show Title : This make Title always visible. Default value is false.
final
appBarColor Color?
appBarColor: The color of the scaffold app bar.
final
backgroundColor Color?
backgroundColor: The color of the Material widget that underlies the entire DraggableHome body.
final
body List<Widget>
body: A widget to Body
final
bottomNavigationBar Widget?
bottomNavigationBar: Snack bars slide from underneath the bottom navigation bar while bottom sheets are stacked on top.
final
bottomNavigationBarHeight double?
bottomNavigationBarHeight: This is requires when using custom height to adjust body height. This make no effect on bottomNavigationBar.
final
bottomSheet Widget?
bottomSheet: A persistent bottom sheet shows information that supplements the primary content of the app. A persistent bottom sheet remains visible even when the user interacts with other parts of the app.
final
centerTitle bool
Center Title: Allows toggling of title from the center. By default title is in the center.
final
curvedBodyRadius double
curvedBodyRadius: Creates a border top left and top right radius of body, Default radius of the body is 20.0. For no radius simply set value to 0.
final
drawer Widget?
Drawer: Drawers are typically used with the Scaffold.drawer property.
final
expandedBody Widget?
expandedBody: A widget to display when fully expanded as header or expandedBody above body.
final
floatingActionButton Widget?
floatingActionButton: An object that defines a position for the FloatingActionButton based on the Scaffold's ScaffoldPrelayoutGeometry.
final
floatingActionButtonAnimator FloatingActionButtonAnimator?
floatingActionButtonAnimator: Provider of animations to move the FloatingActionButton between FloatingActionButtonLocations.
final
floatingActionButtonLocation FloatingActionButtonLocation?
floatingActionButtonLocation: An object that defines a position for the FloatingActionButton based on the Scaffold's ScaffoldPrelayoutGeometry.
final
fullyStretchable bool
fullyStretchable: Allows toggling of fully expand draggability of the DraggableHome. Set this to true to allow the user to fully expand the header.
final
hashCode int
The hash code for this object.
no setterinherited
headerBottomBar Widget?
headerBottomBar: AppBar or toolBar like widget just above the body.
final
headerExpandedHeight double
Header Expanded Height : Height of the header widget. The height is a double between 0.0 and 1.0. The default value of height is 0.35 and should be less than stretchMaxHeigh
final
headerWidget Widget
Header Widget: A widget to display Header above body.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
Leading: A widget to display before the toolbar's title.
final
physics ScrollPhysics?
physics: How the scroll view should respond to user input. For example, determines how the scroll view continues to animate after the user stops dragging the scroll view.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
scrollController: An object that can be used to control the position to which this scroll view is scrolled.
final
stretchMaxHeight double
stretchMaxHeight: Height of the expandedBody widget. The height is a double between 0.0 and 0.95. The default value of height is 0.9 and should be greater than headerExpandedHeight
final
stretchTriggerOffset double
stretchTriggerOffset: The offset of overscroll required to fully expand the header.
final
title Widget
Title: A Widget to display title in AppBar
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _DraggableHomeState
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