DashboardScreen class
The panel's dashboard: stat cards and, when the host supplies one, charts.
A plain widget with no router dependency, structured like
PanelIndexScreen: the host owns the provider and decides how this
screen is reached.
This package draws no charts of its own — it ships exactly two
dependencies (flutter, equatable), and that is a headline feature,
not an oversight. A chart widget with no chartBuilder renders its
heading and a "no chart renderer" note rather than pulling in a charting
package on the package's behalf. Do not "fix" that by adding one here;
the host supplies chartBuilder with whatever charting library it
already has.
Deliberately owns no Scaffold/AppBar, unlike its sibling screens:
DashboardProvider carries no title to put in one, so hosts wire this
screen directly into whatever chrome they already have.
Wrapped in a Directionality resolved from the panel, same as its five
sibling screens (Task 4b closes the gap Task 4 left stated here):
GET /dashboard now publishes its own direction, the same closed
ltr/rtl set /schema's panel.direction does, and DashboardData
parses it. No host-facing parameter — the wrap reads the loaded data,
same as every other screen.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DashboardScreen
Constructors
-
DashboardScreen({required DashboardProvider provider, DashboardChartBuilder? chartBuilder, FilamentWidgetRegistry? widgetRegistry, void onStatTap(String resourceKey)?, PanelBodyBuilder? stateBuilder, FilamentStrings strings = const FilamentStrings(), double? maxContentWidth, Duration? pollInterval, FilamentEventTransport? eventTransport, List<
String> realtimeChannels = const [], Key? key}) -
const
Properties
- chartBuilder → DashboardChartBuilder?
-
final
- eventTransport → FilamentEventTransport?
-
Optional host-owned Reverb adapter and the panel resource channels whose
changes can affect dashboard aggregates. Empty channels keep polling.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxContentWidth → double?
-
Maximum width for the dashboard content. Null uses a default based on the
current layout (1200 when not compact, unconstrained when compact).
final
- onStatTap → void Function(String resourceKey)?
-
Called with a stat's StatData.resourceKey when its tile is tapped.
Navigation is the host's job, same division as every
onXTapin this package — and the same gate: a tile is tappable only when the server published a target AND the host wired this. Either half missing renders the plain tile, never one that ripples and silently no-ops.final - pollInterval → Duration?
-
Optional schema-driven revalidation cadence. PanelShell wires the
panel's
poll.dashboardvalue automatically; a directly composed screen may pass it explicitly.final - provider → DashboardProvider
-
final
-
realtimeChannels
→ List<
String> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stateBuilder → PanelBodyBuilder?
-
final
- strings → FilamentStrings
-
final
- widgetRegistry → FilamentWidgetRegistry?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DashboardScreen> -
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, 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