SafaehConnectivityBar class

A one-line bar that appears while the connection is not healthy.

It collapses to nothing for SafaehSyncState.saved and SafaehSyncState.syncing unless showWhenSyncing is set. For offline and failed states it shows label and, when onRetry is set, a retry action. When recoveredLabel is set, going from offline or failed back to saved or syncing briefly shows that text (for example "Back online") for recoveredDuration before collapsing.

Inheritance

Constructors

SafaehConnectivityBar({Key? key, required SafaehSyncState state, required String label, VoidCallback? onRetry, String? retryLabel, bool showWhenSyncing = false, String? recoveredLabel, Duration recoveredDuration = const Duration(seconds: 2)})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String
final
onRetry → VoidCallback?
final
recoveredDuration → Duration
final
recoveredLabel → String?
final
retryLabel → String?
Localized text for the retry action; required to show it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showWhenSyncing → bool
final
state → SafaehSyncState
final

Methods

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