PushOffNotice class
A quiet, tappable marker that this device cannot be reached by push.
A glyph and one line for a sidebar row, the glyph alone for a compact top bar. Tapping it calls onOpenPreferences, which a host wires to wherever PushPromptHost and its controls actually live.
Why it exists at all, and why it is not louder
The soft prompt lives on a settings screen most people open rarely, so on
the surfaces they DO look at, a device that cannot be reached is
indistinguishable from one that can. It is still not an alarm: it carries
no colour beyond the glyph, and never blocks anything, which is also why
the reminder's own cadence lives in
NotificationManager.repromptAfterHoursKey rather than here.
When it says nothing
Exactly when there is nothing to do about it, which is PushPromptAction.none: a device that is already subscribed, and a build with no push driver at all (a platform the SDK does not cover, and a platform read that failed). A permanent marker nobody can resolve is the fastest way to train people to ignore the one that matters.
Example Usage:
PushOffNotice(onOpenPreferences: () => MagicRoute.to('/settings/notifications'))
PushOffNotice(compact: true, onOpenPreferences: () => MagicRoute.to('/settings/notifications'))
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PushOffNotice
Constructors
- PushOffNotice({Key? key, required VoidCallback onOpenPreferences, bool compact = false})
-
Creates the shell notice.
const
Properties
- compact → bool
-
Whether to render the glyph alone, for a bar with no room for a label.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onOpenPreferences → VoidCallback
-
Called when the marker is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PushOffNotice> -
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