Dashboard<T extends DashboardItem> class

A list of widget arranged with hand or initially.

Dashboard is scrolling widget that contains items which can edited by size and place.

In general, it is used to allow the user to control the locations and dimensions of the views(e.g. task list, charts etc.) in applications that have many different views.

Dashboard divides the viewport to a certain number of slots on the horizontal and places the items according to these slots.

The slot width is determined by slotCount value. And slot height determined by slotHeight or slotAspectRatio. In default slots are square.

dashboardItemController determines the layouts of widgets to be displayed in initial state. This controller is also used to add/delete widget and handle layout changes.

Inheritance

Constructors

Dashboard({Key? key, required DashboardItemBuilder<T> itemBuilder, required DashboardItemController<T> dashboardItemController, int slotCount = 8, ScrollController? scrollController, ScrollPhysics? physics, DragStartBehavior? dragStartBehavior, ScrollBehavior? scrollBehavior, double cacheExtend = 500, double verticalSpace = 8, double horizontalSpace = 8, EdgeInsetsGeometry padding = const EdgeInsets.all(0), bool shrinkToPlace = true, bool slideToTop = true, double? slotAspectRatio, double? slotHeight, EditModeSettings? editModeSettings, TextDirection textDirection = TextDirection.ltr, Widget errorPlaceholder(Object error, StackTrace stackTrace)?, Widget? loadingPlaceholder, Widget? emptyPlaceholder, bool absorbPointer = true, bool animateEverytime = true, ItemStyle itemStyle = const ItemStyle(), bool scrollToAdded = true, SlotBackgroundBuilder<T>? slotBackgroundBuilder})
A list of widget arranged with hand or initially.

Properties

absorbPointer bool
Absorb item gestures on edit mode.
final
animateEverytime bool
In edit mode, item position changes due to resizing/moving are animated.
final
cacheExtend double
The viewport has an area before and after the visible area to cache items that are about to become visible when the user scrolls. Items that fall in this cache area are laid out even though they are not (yet) visible on screen. The cacheExtent describes how many pixels the cache area extends before the leading edge and after the trailing edge of the viewport. The total extent, which the viewport will try to cover with children, is cacheExtent before the leading edge + extent of the main axis + cacheExtent after the trailing edge.
final
dashboardItemController DashboardItemController<T>
dashboardItemController is dashboard items controller. The controller determines initial DashboardItems and add / delete operations are done with this controller.
final
dragStartBehavior DragStartBehavior?
Scrollable widget dragStartBehavior.
final
editModeSettings EditModeSettings
When in Layout edit mode is true, some paintings/drawings are made on the viewport background and items (widgets) foreground.
final
emptyPlaceholder Widget?
If the function don't have any data then it should display something In empty data, Dashboard shows emptyPlaceholder.
final
errorPlaceholder → (Widget Function(Object error, StackTrace stackTrace)?)
If the dashboardItemController uses a DashboardItemStorageDelegate, the loading of the items initially is done with a FutureOr function.
final
hashCode int
The hash code for this object.
no setterinherited
horizontalSpace double
Horizontal gap between two items.
final
itemBuilder DashboardItemBuilder<T>
Each existing DashboardItem in the dashboardItemController must added to widget tree.
final
itemStyle ItemStyle
Each item is wrapped by a Material. Material's parameters can be specified with itemStyle.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingPlaceholder Widget?
If the dashboardItemController uses a DashboardItemStorageDelegate, the loading of the items initially is done with a FutureOr function.
final
padding EdgeInsetsGeometry
padding is the spacing between items and Dashboard outer edges.
final
physics ScrollPhysics?
Scrollable widget scrollPhysics.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollBehavior ScrollBehavior?
Scrollable widget scrollBehavior.
final
scrollController ScrollController?
Scrollable widget scrollController.
final
scrollToAdded bool
If scrollToAdded is true, when a new item is added, the viewport scrolls to the added item.
final
shrinkToPlace bool
When adding a new item, item dimensions editing or in the initial re-arranging, items trying to place certain position. When the item not fit to the position (e.g. conflict with another item), if shrinkToPlace is true item dimensions trying to shrink, else Dashboard decide that item not placed to the position.
final
slideToTop bool
Initially try slide items to top.
final
slotAspectRatio double?
slotAspectRatio determines slots height. Slot width determined by viewport width and slotCount.
final
slotBackgroundBuilder SlotBackgroundBuilder<T>?
If slotBackgroundBuilder is not null, the background of the slots is drawn with the SlotBackgroundBuilder.build method.
final
slotCount int
Vertical slot count.
final
slotHeight double?
slotHeight determines slots height by fixed length.
final
textDirection TextDirection
padding resolved with textDirection.
final
verticalSpace double
Vertical gap between two items.
final

Methods

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